Type Characters

Identifier type characters

Type characterData typeExample
Dim a%
Dim a!
Dim a$

Default literal types

The form of a literal normally determines its data type. The following table summarizes the defaults.

Qualities of a literalDefault data typeExample
Numeric, no fractional partInt
32768 32_768
Numeric, no fractional part, too large for IntInt128
Numeric, fractional partReal
3.14159 4.1e-8
Enclosed in backticksChar
`A` `@`
Starts with percentInt
Enclosed in double quotation marksString
"Hello, world!"
Starts with a dollar signString
$CR $13 $LINE
Starts with an at-sign, with three groups of numbersDateTime
@2013.12.11 @2013-12-11 
@2013/12/11 @10:09:08
Starts with an at- or currency sign, numeric, fractional partFixed64
@12.34 @$12.34 ¤12.34

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