分类 |
范围 |
字节 |
备注 |
简单类型 |
序数 |
整数 |
Integer |
-2147483648 .. 2147483647 |
4 |
有符号32位 |
Cardinal |
0 .. 4294967295 |
无符号32位 |
Shortint |
-128 .. 127 |
1 |
有符号8位 |
Smallint |
-32768 .. 32767 |
2 |
有符号16位 |
Longint |
Int64 |
-263?.. 263
|
8 |
有符号64位 |
Byte |
0 .. 255 |
无符号8位 |
Word |
0 .. 65535 |
无符号16位 |
Longword |
无符号32位 |
字符 |
AnsiChar(Char) |
ANSI字符集 |
? |
8位 |
WideChar |
Unicode字符集 |
16位 |
布尔 |
Boolean |
False < True Ord(False) = 0 Ord(True) = 1 Succ(False) = True Pred(True) = False |
? |
ByteBool |
False <> True Ord(False) = 0 Ord(True) <> 0 Succ(False) = True Pred(False) = True |
WordBool |
LongBool |
? |
枚举 |
子界 |
? |
实数 |
Real |
5.0×10-324?.. 1.7×10308
|
[精度]15..16 |
Real48 |
2.9×10-39?.. 1.7×1038
|
6 |
[精度]11..12; 向后兼容 |
Single |
1.5×10-45?.. 3.4×1038
|
[精度]7..8 |
Double |
Extended |
3.6×10-4951?.. 1.1×104932
|
10 |
[精度]19..20 |
Comp |
-263?+ 1 .. 263?- 1 |
Currency |
-922337203685477.5808 ..? 922337203685477.5807 |
[精度]19..20 |
字符串 |
? |
ShortString |
255个字符 |
2..256B |
向后兼容 |
AnsiString |
大约 231?个字符 |
4B..2GB |
8位(ANSI)字符 |
WideString |
大约 230?个字符 |
多用户服务和 多语言应用程序;? 和com定义的BSTR兼容 |
其他 |
String String[0..255] PChar PAnsiString PWideString |
? |
结构类型 |
集合 |
Set |
最多256个元素[0..255] |
? |
数组 |
静态数组 |
动态数组 |
记录 |
Record |
文件 |
File |
类 |
Class |
类引用 |
Class reference |
接口 |
Interface |
指针类型 |
无类型指针 |
Pointer |
有类型指针 |
预定义类型指针 |
PAnsiString PString PByteArray PCurrency PDouble PExtended PSingle PInteger POleVariant PShortString PTextBuf PVarRec PVariant PWideString PWordArray |
过程类型 |
程序过程类型 |
Procedural |
对象过程类型 |
变体类型 |
? |
Variant |
OleVariant |