金贤姬自传在线看:DELPHI 完整数据类型

来源:百度文库 编辑:神马品牌网 时间:2024/05/03 08:47:05
求:DELPHI 完整数据类型

Byte 字节型 1 0~255
Word 长字型 2 0~65535
...

string 字符型
---------------------------

我是一DELPHI初学者,希望越详细越好~~^_^先谢了~

a、 整数类型: (通用类型<32位>:Integer-有符号;Cardinal-无符号)
具体:
有符号:Shortint<8位>,Smallint<16位>,Longint<32位 >
无符号:Byte<8位>,Word<16位>,LongiWord<32位 >

b、字符类型: (通用类型<8位>:Char -与AnsiChar等同)
具体:
AnsiChar<8位> :主要存放Ansi字符
WideChar<16位>:主要存放Unicode字符

c、布尔类型: (通用类型<8位>:Boolean-与ByteBool等同)
具体:
ByteBool<8位>,WordBool<16位>,LongBool<32位>
不同的布尔类型主要用于鱼其它编程语言及不同windows系统兼容。

d、枚举类型:
定义:type 枚举类型标识符=(key1[=val1],.。。。,keyn[=valn]) :n<=255
如果给某些key指定了值,则未指定值的key是前一个key值加1;
如果全部默认不指定值,则key1值为0,往后逐个加1。

e、子界类型:
定义:type 子界类型标识符=下界 ..下界
如:type SubInt=1..3 0;表示 1~30的整数
type SubChar='a'..'z';表示字符

Integer
-2147483648..2147483647
signed 32-bit
System.Int32

Cardinal
0..4294967295
unsigned 32-bit
System.UInt32

Shortint
-128..127
signed 8-bit
System.SByte

Smallint
-32768..32767
signed 16-bit
System.Int16

Longint
-2147483648..2147483647
signed 32-bit
System.Int32

Int64
-2^63..2^63-1
signed 64-bit
System.Int64

Byte
0..255
unsigned 8-bit
System.Byte

Word
0..65535
unsigned 16-bit
System.UInt16

Longword
0..4294967295
unsigned 32-bit
System.UInt32

Real48
-2.9 x 10^39 .. 1.7 x 10^38
11-12
6

Single
-1.5 x 10^45 .. 3.4 x 10^38
7-8
4

Double
-5.0 x 10^324 .. 1.7 x 10^308
15-16
8

Extended
-3.6 x 10^4951 .. 1.1 x 10^4932
10-20
10

Comp
-2^63+1 .. 2^63 1
10-20
8

Currency
-922337203685477.5808.. 922337203685477.5807
10-20
8