Delphi基礎知識匯總

來源:互聯網
上載者:User

標籤:delphi

☆Delphi基礎資料類型

分類 範圍 位元組 備忘
簡單類型 序數 整數 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




聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.