Type Characters

Identifier type characters

Type characterData typeExample
%Int
Dim a%
!Real
Dim a!
$String
Dim a$

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
32768 32_768
Numeric, fractional part Real
3.14159 4.1e-8
Between backticks Char
`A` `@`
Starts with percent Int
%CR %RETURN
Between double quotation marks String
"Hello, world!"
Starts with a dollar sign String
$CR $13 $LINE
Starts with an at-sign, with three groups of numbers DateTime
@2013.12.11 @2013-12-11 
@2013/12/11 @10:09:08
Starts with an at-sign or currency sign, numeric, fractional part Fixed64
@12.34 @$12.34 ¤12.34
@£1_234_567.89

Hexadecimal, octal, and binary literals

Number basePrefixApplicable digitsExamples
Hexadecimal (base 16)&H0–9 A–F
&HFFF &HFF_00_2A
Octal (base 8)&O0–7
&O777 &O377_777
Binary (base 2)&B0 1
&B101010 &B11111111_11111111

See also