Data Types
Variables (Notes in parenthesis) | VarType | SizeOf (possible formula) | Can set as variant? | Variant implicit string | Variant implicit integer | Variant implicit float | Range (if applicable) |
---|---|---|---|---|---|---|---|
variant (unassigned) | 0 | 16 | yes | 0 | incomplete | Check table category "Can set as variant?" | |
variant <null> | 1 | 16 | yes | exception | exception | incomplete | |
smallint (sint16) | 2 | 2 | yes | 0 | incomplete | incomplete | -32768 to 32767 |
integer, longint (sint32) | 3 | 4 | yes | 0 | incomplete | incomplete | -2147483648 to 2147483647 |
single (fp32) | 5 | 4 | yes | 0 | 0 | incomplete | (7 significant digits), INF, -INF |
double (fp64) | 5 | 8 | yes | 0 | 0 | incomplete | (15 significant digits), INF, -INF |
extended (fp80) | 5 | 10 | yes | 0 | incomplete | incomplete | 1E-38 to 1E+38 (19 significant digits), INF, -INF |
WideChar | 8 | 2 | yes | exception | incomplete | ||
WideString | 8 | 4 | yes | incomplete | incomplete | ||
IDispatch | 9 | 4 | yes | exception | exception | incomplete | |
boolean | 11 | 1 | yes | False | 0 | incomplete | true, false |
shortint (sint8) | 16 | 1 | yes | 0 | incomplete | incomplete | -128 to 127 |
byte (uint8) | 17 | 1 | yes | 0 | incomplete | incomplete | 0 to 255 |
enum | 17 | 1 | yes | 0 | 0 | incomplete | min >= 1; max <= unknown (at least 65536 compiles) |
TIFException | 17 | 1 | yes | 0 | 0 | incomplete | Cannot set as an integer |
word, TVarType (uint16) | 18 | 2 | yes | 0 | 0 | incomplete | 0 to 65535 |
cardinal, longword (uint32) | 19 | 4 | yes | 0 | incomplete | incomplete | 0 to 4294967295 |
LongBool | 19 | 4 | |||||
Int64 (sint64) | 20 | 8 | yes | 0 | incomplete | incomplete | |
char | 256 | 1 | yes | <#000> | exception | incomplete | ASCII character set |
string | 256 | 4 | yes | incomplete | incomplete | length from 0 to 1541210095 | |
array of <type> | 8204 | 4 | yes | exception | exception | incomplete | length from -7 to 1074241824 (2^30) |
array[min..max] of <type> | exception | varies; (max-min)*sizeof(type) | no | exception | exception | exception | max-min <= 536870910 (2^29-2) |
set of <byte/char> | exception | 32 | no | exception | exception | exception | |
set of <boolean/enum> | exception | 1 | no | exception | exception | exception | |
record | exception | varies; sum of sizeof all content | no | exception | exception | exception | |
IUnknown | exception | 4 | no | exception | exception | exception | |
___Pointer | exception | exception | no | ||||
function: <type>, procedure | exception | 12 | no | exception | exception | exception | |
PChar | access violation | 4 |
Refer to http://devs.soldat.pl/wiki/index.php?title=Implicit_Conversions for a list of types that can implicitly convert to another.
TStringArray TVariantArray