Syntax & Variables
Data Types
Section titled “Data Types”Tulpar supports the following data types:
| Type | Description | Example |
|---|---|---|
int | Integer numbers | int x = 42; |
float | Floating-point numbers | float pi = 3.14; |
str | UTF-8 strings | str name = "Hamza"; |
bool | Boolean values | bool flag = true; |
array | Mixed-type arrays | array mix = [1, "text", 3.14]; |
arrayInt | Type-safe integer arrays | arrayInt nums = [1, 2, 3]; |
arrayFloat | Type-safe float arrays | arrayFloat vals = [1.5, 2.5]; |
arrayStr | Type-safe string arrays | arrayStr names = ["Ali", "Veli"]; |
arrayBool | Type-safe boolean arrays | arrayBool flags = [true, false]; |
arrayJson | JSON-like objects | arrayJson obj = {"key": "value"}; |
Variables and Constants
Section titled “Variables and Constants”Variables are declared with their type:
Variables
Çıktı
Comments
Section titled “Comments”Tulpar supports single-line and multi-line comments:
Comments
Çıktı