从 Delphi 7 到 Delphi 2010 -- ( 一 )基本数据类型的变化

 

装上Delphi 2010 后, 试了一下, 感觉不错, 只是基本数据类型发生变化了.

-----------------------------------------------------------------------------------------------------------

Delphi 7             字节数                                                Delphi 2010                    字节数

-----------------------------------------------------------------------------------------------------------------

char                 1                                                         ansichar                           1

                                                                                    char                                 2

Integer             4                                                        Integer                              4

byte                  1                                                       byte                                   1

word                   2                                                      word                                   2

Cardinal            4                                                       Cardinal                            4

double              8                                                        double                              8

currency            8                                                       currency                             8

-------------------------------------------------------------------------------------------------------------

string 的                                                                   string 的

一个字符           1                                                     一个字符                              2

                                                                               ansistring

                                                                                的一个字符                           1

--------------------------------------------------------------------------------------------------------------

从表中我们看到:

     基础数据类型 最大的变化是:

     char   变成了 2字节的 unicode 字符

    string   变成了   unicode 字符串

delphi 2010 在 system 中新增:

type
Int8   = ShortInt;
Int16 = SmallInt;
Int32 = Integer;
UInt8 = Byte;
UInt16 = Word;
UInt32 = Cardinal;

                        

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值