Please enable JavaScript to view this site.

 

Navigation: Macros > Macro Language > Data Types

Macro Language Literals (or constants)

Scroll Prev Up Next More

A literal, as opposed to a variable, is a constant value of a given data type.

 

Literals can be assigned to a variable of the same type :

sName = 'Olivier'
nAge = 39
bIsSmart = true

Literals can also be used in expressions :

nTomorrow = Today() + 1
sFullName = 'Olivier' + sFamilyName

In all cases, note how the Code Editor uses syntax highlighting to identify string literals in blue, integer literals in red and boolean literals in grey.

 

Use two single quotes for an empty string. To include an apostrophe in text, use chr with character number 39:

sEmpty = ''
sText = 'Today' + chr(39) + 's date'

See also: Unterminated string.

 


Topic 136300, last updated on 16-Oct-2026