Delphi basic data type (built-in data types)

classification range byte Remark
Simple type Ordinal Integer Integer -2147483648 .. 2147483647 4 Signed 32
Cardinal 0 .. 4294967295 4 Unsigned 32-bit
Shortint -128 .. 127 1 Signed 8
Smallint -32768 .. 32767 2 Signed 16
Longint -2147483648 .. 2147483647 4 Signed 32
Int64 -263 .. 263 8 Signed 64
Byte 0 .. 255 1 Unsigned 8
Word 0 .. 65535 2 Unsigned 16
Longword 0 .. 4294967295 4 Unsigned 32-bit
character AnsiChar (Char) ANSI character set   8th
WideChar Unicode character set   # 16
Boolean Boolean False < True
Ord(False) = 0
Ord(True) = 1
Succ(False) = True
Pred(True) = False
1  
ByteBool False <> True
Ord(False) = 0
Ord(True) <> 0
Succ(False) = True
Pred(False) = True
1  
WordBool 2  
LongBool 4  
enumerate        
Child world        
Real   Real 5.0×10-324 .. 1.7×10308 8 [Accuracy] 15..16
Real48 2.9×10-39 .. 1.7×1038 6 [The precision] 11..12;
backward compatibility
Single 1.5×10-45 .. 3.4×1038 4 [Accuracy] 7..8
Double 5.0×10-324 .. 1.7×10308 8 [Accuracy] 15..16
Extended 3.6×10-4951 .. 1.1×104932 10 [Accuracy] 19..20
Comp -263 + 1 .. 263 - 1 8 [Accuracy] 19..20
Currency -922337203685477.5808 .. 
922337203685477.5807
8 [精度]19..20
字符串     ShortString 255个字符 2..256B 向后兼容
AnsiString 大约 231 个字符 4B..2GB 8位(ANSI)字符
WideString 大约 230 个字符 4B..2GB 多用户服务和
多语言应用程序; 
和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      
对象过程类型   Procedural      
变体类型     Variant      
  OleVariant      
发布了27 篇原创文章 · 获赞 1 · 访问量 999

Guess you like

Origin blog.csdn.net/jason156/article/details/90649554