-
$STR: string"hello", "hello123", "hello world", "123", "!@#$#%##$@123df"Can contain alphabets, numbers, spesial characters inside double quots (
""). -
$INT: integer123, 1000, 1343747Can contain only numbers.
-
$BOOL: booleanTRUE, FALSEOnly those two options.
-
$FLOAT: float1.234, 0.122323, 3.1415, 1.0000Can contain only numbers with decimal point, can not start with
0. -
$BIN: binary0b101010001, 0b1111111, 0b000101101, 0b000000Can contain only
0and1, starting with0b. -
$HEX: hexadecimal0x123, 0xAAA, 0x12AA, 0xABCDEF,Can contain only
0 - 0andA - Fstarting with0x. -
$OCT: octal0o123, 0o1234, 0o4644612Can contain only
0 - 7starting with0o. -
$CHAR: character'a', '1', '%'Can contain only one character of alphabets, numbers, spesial characters inside single quots (
'').
- Each line must end with a space and a semi colon (
;). - The start of the bolck thet 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.
| operator | meaning |
|---|---|
+ |
addition |
- |
subtraction |
* |
multiplication |
/ |
division |
% |
modulus |
| operator | meaning |
|---|---|
== |
equal to |
!= |
not equal to |
> |
greater than |
< |
less than |
>= |
greater than or equal to |
<= |
less than or equal to |
| operator | meaning |
|---|---|
&& |
and |
|| |
or |
! |
not |
| operator | meaning |
|---|---|
& |
bitwise and |
| |
bitwise or |
^ |
bitwise xor |
~ |
bitwise not |
<< |
left shift |
>> |
right shift |
| operator | meaning |
|---|---|
= |
assignment |
& |
address of |
* |
dereference |
. |
dot |
-> |
arrow |
, |
comma |
sizeof |
size of data |
-
SET- To assign value to a variable.# syntax: SET <variable_name> $<type> = <value> ; # example: SET name $STRING = "Bob" ; SET age $INT = 20 ; SET is_boy $BOOL = TRUE ; SET mark_percent $FLOAT = 75.89 ; SET grade $CHAR = 'B' ; -
PRINT- To print a value to the terminal.# syntax: PRINT <value-1>, <value-2>, <value-3>, <value-n>, ... ; # example PRINT "BOB" ; PRINT 123 ; PRINT "mark: ", 90.5 ; -
INPUT- To take input from the user.# syntax: INPUT <variable_name> $<type> ; # example: INPUT name $STRING ; INPUT age $INT ; INPUT is_boy $BOOL ; INPUT mark_percent $FLOAT ; INPUT grade $CHAR ; -
GOTO- To jump to a label.# syntax: <lable_name>: <statement> ; ... GOTO <lable_name> ; -
IF-THEN-ELSE- To check a condition.# syntax: # method 1 IF <condition> THEN <statement> ELSE <statement> ; # method 2 IF <condition> THEN <statement-1> ; <statement-2> ; ... <statement-n> ; ELSE <statement-1> ; <statement-2> ; ... <statement-n> ; ENDIF ; -
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> ;