谁能确切的罗列下,delphi中整型和实型变量的取值范围?
整型是不是还分integer和Longint啊?
整型是不是还分integer和Longint啊?
解决方案 »
- 请教,ICS组件中的HttpCli怎么加自定义Header?
- 100分求解!!怎么回事?数据库连接不上??
- 请教一个关于DBGridEh的多选后的定位问题
- 困扰了我很长时间的难题:我想往一个Handle上写字, 由于调用DrawText, 不能设置行距,所以我手工把文字分行,但是问题来了。。。
- 哪儿能下载李维的书?
- 程序员,路之难也......想到什么就说什么,想怎样说就怎样说!
- 关于Object Pascal
- delphi5调试问题
- delphi调用webService时报错:ESOAPHTTPException(如何解决)
- 请叫一个数据库显示的问题(给分的)
- Tclientdataset建立内存表做为RAVE报表中DATAVIEW的数据源,为什么DATAVIEW不能显示出字段来呢?
- 关于FastReport
Integer -2147483648..2147483647 signed 32-bit
Cardinal 0..4294967295 unsigned 32-bit
Fundamental integer types include Shortint, Smallint, Longint, Int64, Byte, Word, and Longword.Fundamental integer types
Type Range Format
Shortint -128..127 signed 8-bit
Smallint -32768..32767 signed 16-bit
Longint -2147483648..2147483647 signed 32-bit
Int64 -2^63..2^63-1 signed 64-bit
Byte 0..255 unsigned 8-bit
Word 0..65535 unsigned 16-bit
Longword 0..4294967295 unsigned 32-bit
简单类型 序数 整数 Integer -2147483648 .. 2147483647 4 有符号32位
Cardinal 0 .. 4294967295 4 无符号32位
Shortint -128 .. 127 1 有符号8位
Smallint -32768 .. 32767 2 有符号16位
Longint -2147483648 .. 2147483647 4 有符号32位
Int64 -263 .. 263 8 有符号64位
Byte 0 .. 255 1 无符号8位
Word 0 .. 65535 2 无符号16位
Longword 0 .. 4294967295 4 无符号32位
字符 AnsiChar(Char) ANSI字符集 8位
WideChar Unicode字符集 16位
布尔 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
枚举
子界
实数 Real 5.0×10-324 .. 1.7×10308 8 [精度]15..16
Real48 2.9×10-39 .. 1.7×1038 6 [精度]11..12;
向后兼容
Single 1.5×10-45 .. 3.4×1038 4 [精度]7..8
Double 5.0×10-324 .. 1.7×10308 8 [精度]15..16
Extended 3.6×10-4951 .. 1.1×104932 10 [精度]19..20
Comp -263 + 1 .. 263 - 1 8 [精度]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
ctrl+shift +c
ctrl+shift+i
ctrl+shift+u
ctrl+shift+向上键
ctrl+shift+向下键
Integer –2147483648~2147483647
signed 32-bitCardinal 0~4294967295
unsigned 32-bitShortint –128~127
signed 8-bit
Smallint –32768~32767 signed 16-bit
Longint –2147483648~2147483647 signed 32-bit
Int64 –263~263–1 s
igned 64-bitByte 0~255
unsigned 8-bit
Word 0~65535
unsigned 16-bit
Longword 0~4294967
unsigned 32-bit
Real类型 精度 取值范围 空间
Real 15-16 5.0*10^-324~1.7*10^308 8B
Single 7-8 1.5*10^45~3.4*10-38 4B
Double 15-16 5.0*10^-324~1.7*10^308 8B
Extended 19-20 3.6*10^-4951~1.1*10^4932 10B
Currency 19-20 8B