Type Characters
Identifier type characters
Type character | Data type | Example |
---|---|---|
% | Int |
|
! | Real |
|
$ | String |
|
Default literal types
The qualities of a literal usually give it its data type. The table that follows gives the defaults.
Qualities of a literal | Default data type | Example |
---|---|---|
Numeric, no fractional part | Int |
|
Numeric, fractional part | Real |
|
Between backticks | Char |
|
Starts with percent | Int |
|
Between double quotation marks | String |
|
Starts with a dollar sign | String |
|
Starts with an at-sign, with three groups of numbers | DateTime |
|
Starts with an at-sign or currency sign, numeric, fractional part | Fixed64 |
|
Hexadecimal, octal, and binary literals
Number base | Prefix | Applicable digits | Examples |
---|---|---|---|
Hexadecimal (base 16) | &H | 0–9 A–F |
|
Octal (base 8) | &O | 0–7 |
|
Binary (base 2) | &B | 0 1 |
|