Grammar¶
Types¶
-
Can contain alphabets, numbers, special characters inside double quotes ($STR: string""). -
Can contain only numbers.$INT: integer -
$BOOL: booleanTRUE, FALSEOnly those two options. -
Can contain only numbers with decimal point, can not start with$FLOAT: float0. -
Can contain only$BIN: binary0and1, starting with0b. -
Can contain only$HEX: hexadecimal0 - 0andA - Fstarting with0x. -
Can contain only$OCT: octal0 - 7starting with0o. -
Can contain only one character of alphabets, numbers, special characters inside single quotes ($CHAR: character'').
syntax¶
- Each line must end with a space and a semi colon (
;). - The start of the block that is to be executed must start with
STARTstatement. - Every script must end with a
ENDstatement. - If the execution of a code have to be ended in between, the
ENDstatement. - Variable name can only contain alphabet (a-z, A-Z), number (0-9) and a under score (_), can't start with a number.
operators¶
Arithmetic operators¶
| operator | meaning |
|---|---|
+ |
addition |
- |
subtraction |
* |
multiplication |
/ |
division |
% |
modulus |
Comparison operators¶
| operator | meaning |
|---|---|
== |
equal to |
!= |
not equal to |
> |
greater than |
< |
less than |
>= |
greater than or equal to |
<= |
less than or equal to |
Logical operators¶
| operator | meaning |
|---|---|
&& |
and |
\|\| |
or |
! |
not |
bitwise operators¶
| operator | meaning |
|---|---|
& |
bitwise and |
\| |
bitwise or |
^ |
bitwise xor |
~ |
bitwise not |
<< |
left shift |
>> |
right shift |
Special/Miscellaneous Operators¶
| operator | meaning |
|---|---|
= |
assignment |
& |
address of |
* |
dereference |
. |
dot |
-> |
arrow |
, |
comma |
sizeof |
size of data |
Keywords¶
-
SET- To assign value to a variable. -
PRINT- To print a value to the terminal. -
INPUT- To take input from the user. -
GOTO- To jump to a label. -
IF-THEN-ELSE- To check a condition. -
FOR-NEXT- To iterate over a range.# syntax: # method 1: with out `STEP` FOR <control_variable> = <value> TO <end_value> <statement-1> ; <statement-2> ; ... <statement-n> ; NEXT <control_variable> ; # method 2: with `STEP` FOR <control_variable> = <value> TO <end_value> STEP <step_value> <statement-1> ; <statement-2> ; ... <statement-n> ; NEXT <control_variable> ;