Summary:
See also: Variables, Data Types, Expressions.
The language supports integer literals in base-10 notation, without blank spaces and commas and without a decimal point.
[+|-] digit[...]
01MAIN02DEFINE n INTEGER03LET n = 123456704END MAIN
The language supports decimal literals as a base-10 representation of a real number, with an optional exponent notation.
[+|-] digit[...] dot digit[...]
[ {e|E} [+|-] digit[...]
]
01MAIN02DEFINE n DECIMAL(10,2)03LET n = 12345.6704LET n = -1.23456e-1005END MAIN
The language supports string literals delimited by single quotes or double quotes.
" alphanum [...] "
' alphanum [...] '
A string literal can be written on multiple lines, the compiler merges lines by removing the new-line character.
The escape character is the back-slash character (\).
Quotes can be doubled to be included in strings.
An empty string ("") is equivalent to NULL.
\\ is a backslash character.\" is a double-quote character.\' is a single-quote character.\n is a new-line character.\r is a carriage-return character.\0 is a null character.\f is a form-feed character.\t is a tab character.\xNN is a character defined by the hexadecimal code NN.01MAIN02DISPLAY "Some text in double quotes"03DISPLAY 'Some text in single quotes'04DISPLAY "Escaped double quotes : \" "" "05DISPLAY 'Escaped single quotes : \' '' '06DISPLAY 'Insert a new-line character here: \n and continue with text.'07DISPLAY "This is a text08on multiple09lines.\10You can insert a new-line with back-slash at the end of the line."11IF "" IS NULL THEN DISPLAY 'Empty string is NULL' END IF12END MAIN
The language supports datetime literals with the DATETIME () notation.
DATETIME ( dtrep ) qual1 TO qual2[(scale)]
01MAIN02DEFINE d1 DATETIME YEAR TO SECOND03DEFINE d2 DATETIME HOUR TO FRACTION(5)04LET d1 = DATETIME ( 2002-12-24 23:55:56 ) YEAR TO SECOND05LET d2 = DATETIME ( 23:44:55.34532 ) HOUR TO FRACTION(5)06END MAIN
The language supports interval literals with the INTERVAL() notation.
INTERVAL ( inrep ) qual1[(precision)]
TO qual2[(scale)]
01MAIN02DEFINE i1 INTERVAL YEAR TO MONTH03DEFINE i2 INTERVAL HOUR(5) TO SECOND04LET i1 = INTERVAL ( 345-5 ) YEAR TO MONTH05LET i2 = INTERVAL ( 34562:22:33 ) HOUR(5) TO SECOND06END MAIN