Skip to main content
Version: 4.x

Literals

NameExampleClassDescriptionConstraints
String literal'text'
'line1\nline2'
'{system.cancel}'
STRING[N], TEXT, ITEXTA sequence of characters enclosed in single quotes, allowing to use the special sequences \n, \r, \t. To specify single quote and backslash characters, use the escape sequences \' and \\. A string literal can also be a localizable string. In this case the literal's class will be TEXT, and instead of the characters { and } it is necessary to use the special sequences \{ and \} respectively. If a string literal does not use localization capabilities, then the literal's class will be STRING[N] where N is the number of characters in the string.
Integer literal (int)56
-32
1000000000
INTEGERA sequence of numbers with an optional minus sign at the beginning32-bit signed integers
Integer literal (long)56L
-32L
1000000000000L
LONGA sequence of numbers with an optional minus sign at the beginning and the letter L (uppercase or lowercase) at the end64-bit signed integers
Floating-point literal3d
4.25D
-2.125D
DOUBLEA sequence of numbers specifying the integer part, then a dot, then a sequence of numbers specifying the fractional part (possibly empty), then the letter D (uppercase or lowercase). With an optional minus sign at the beginning.64-bit floating point number
NUMERIC class literal3
4.25
-2.125
NUMERIC[N,M]A sequence of numbers specifying the integer part, then a dot, then a sequence of numbers specifying the fractional part (possibly empty). With an optional minus sign at the beginning.The number of digits of the integer and fractional parts of a literal is determined by its class
Logical literalTRUEBOOLEANKeyword TRUEThe opposite value is the special value NULL
DATE class literal1982_07_13
2000_01_25
DATEDate in the format YYYY_MM_DD. Four digits specifying the year, an underscore, two digits for the month, an underscore, and two digits for the day.
TIME class literal12:05
00:59
TIMETime in the format HH:mm. Two digits for the hours, a colon and two digits for the minutes.Hours from 0 to 23, minutes from 0 to 59
DATETIME class literal1982_07_13_12:05DATETIMEDate and time in the format YYYY_MM_DD_HH:mm
COLOR class literalRGB(255, 0, 204)
#FF00CC
COLORTwo definition forms. The first is the keyword RGB, then comma-separated values for the red, green, and blue components in parentheses. The second is the pound sign, then the values of the red, blue, and green components in hexadecimal format, using two characters per component.Each number is from 0 to 255. In hexadecimal representation, you can use both uppercase and lowercase characters