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[...]
01
MAIN02
DEFINE n INTEGER03
LET n = 123456704
END 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[...]
]
01
MAIN02
DEFINE n DECIMAL(10,2)03
LET n = 12345.6704
LET n = -1.2356e-1005
END MAIN
The language supports string literals delimited by single quotes or double quotes.
" alphanum [...] "
' alphanum [...] '
\
), but quotes can also
be doubled to be included in strings.01
MAIN02
DISPLAY "Some text in double quotes"03
DISPLAY 'Some text in single quotes'04
DISPLAY "Escaped double quotes : \" "" "05
DISPLAY 'Escaped single quotes : \' '' '06
DISPLAY 'Insert a new-line character here: \n and continue with text.'07
DISPLAY "This is a text08
on multiple09
lines.\10
You can insert a new-line with back-slash at the end of the line."11
IF "" IS NULL THEN DISPLAY 'Empty string is NULL' END IF12
END MAIN
The language supports datetime literals with the DATETIME () notation.
DATETIME ( dtrep ) qual1 TO qual2[(scale)]
01
MAIN02
DEFINE d1 DATETIME YEAR TO SECOND03
DEFINE d2 DATETIME HOUR TO FRACTION(5)04
LET d1 = DATETIME ( 2002-12-24 23:55:56 ) YEAR TO SECOND05
LET d2 = DATETIME ( 23:44:55.34532 ) HOUR TO FRACTION(5)06
END MAIN
The language supports interval literals with the INTERVAL() notation.
INTERVAL ( inrep ) qual1[(precision)]
TO qual2[(scale)]
01
MAIN02
DEFINE i1 INTERVAL YEAR TO MONTH03
DEFINE i2 INTERVAL HOUR(5) TO SECOND04
LET i1 = INTERVAL ( 345-5 ) YEAR TO MONTH05
LET i2 = INTERVAL ( 34562:12:33 ) HOUR(5) TO SECOND06
END MAIN