Language Constants

Constant Example
The true value. TRUE
The false value. FALSE
Integer or Long numbers. 0, 123, -32769, 10000000000
Hexadecimal short signed integers. &H1F5, &HFFFF, &H0000FFFF, &FFFF
Hexadecimal signed integers. &H10BF332E, &10BF332E
Hexadecimal unsigned integers. &H8000&, &HFFFF&
Binary integers. &X1010010101, %101001011
Floating point numbers. 1.0, -5.345219E+45
Positive infinity +INF
Negative infinity -INF
String constants. "Hello World !"
String constants to be translated. ("This software is cool")
Null constant / void string. NULL

String escape characters

The string constants can contain the following escape characters:

Escape character ASCII equivalent
\n Chr$(13)
\r Chr$(10)
\t Chr$(9)
\b Chr$(8)
\v Chr$(11)
\f Chr$(12)
\e Chr$(27)
\0 Chr$(0)
\" Double quote
\\ Backslash
\xNN Chr$(&HNN)

Multi-line string constants

You can write a string constant in several successive parts, even on several different lines.

For example,

"Gambas" " is " "great"


" is "

are absolutely the same constants as

"Gambas is great"

See also