Delphi 和 C C 資料型別對照

2021-06-05 05:03:23 字數 4851 閱讀 6788

delphi

資料型別

c/c++

shorint

8位有符號整數

char

byte

8位無符號整數

byte,unsigned short

smallint

16位有符號整數

short

word

16位無符號整數

unsigned short

integer,longint

32位有符號整數

int,long

cardinal,longword/dword

32位無符號整數

unsigned long

int64

64位有符號整數 

_int64

single

4位元組浮點數

float

*real48

6位元組浮點數

double

8位元組浮點數

double

*extended

10位元組浮點數

long double

currency

64位貨幣型別

tdate/tdatetime

8位元組日期/時間

variant,olevariant

16位元組可變型別

variant,^variant,^olevariant

char,ansichar

1位元組字元

char

widechar

2位元組字元

wchar

*shortstring

短字串

ansistring/string

長字串

^ansistring

widestring

寬字串

^widestring

pchar,pansichar

null結束的字串

char*

pwidechar

null結束的寬字串

lpcwstr

boolean,bytebool

1位元組布林型別

任何1位元組

wordbool

2位元組布林型別

任何2位元組

bool,longbool

4位元組布林型別

bool

注:有*字首的是向前相容型別;有^字首的是c++builder特有型別。

c/c++

delphi

abctabc

accel

taccel

atom

tatom

bitmap

tbitmap

bitmapcoreheader

tbitmapcoreheader

bitmapcoreinfo

tbitmapcoreinfo

bitmapfileheader

tbitmapfileheader

bitmapinfo

tbitmapinfo

bitmapinfoheader

tbitmapinfoheader

bool

bool

cbt_createwnd

tcbt_createwnd

cbtactivatestruct

tcbtactivatestruct

char

char

char*

pchar

clientcreatestruct

tclientcreatestruct

colorref

tcolorref

compareitemstruct

tcompareitemstruct

comstat

tcomstat

createstruct

tcreatestruct

ctlinfo

tctlinfo

ctlstyle

tctlstyle

ctltype

tctltype

dcbtdcb

ddeaack

tddeack

ddeadvise

tddeadvise

ddedata

tddedata

ddepoke

tddepoke

debughookinfo

tdebughookinfo

deleteitemstruct

tdeleteitemstruct

devmode

tdevmode

double

double

drawitemstruct

tdrawitemstruct

dword

longint

enumlogfont

tenumlogfont

eventmsg

teventmsg

farproc

tfarproc

fixed

tfixed

float

single

glyphmetrics

tglyphmetrics

handle

thandle

handletable

thandletable

hardwarehookstruct

thardwarehookstruct

helpwininfo

thelpwininfo

intinteger

kerningpair

tkerningpair

logbrush

tlogbrush

logfont

tlogfont

logpalette

tlogpalette

logpen

tlogpen

long

longint

long double

extended

long int

longint

lpstr

pchar

lpwstr

pwidechar

mat2

tmat2

mdicreatestruct

***icreatestruct

measureitemstruct

tmeasureitemstruct

menuitemtemplate

tmenuitemtemplate

menuitemtemplateheader

tmenuitemtemplateheader

metafilepict

tmetafilepict

metaheader

tmetaheader

metarecord

tmetarecord

minmaxinfo

tminmaxinfo

mousehookstruct

tmousehookstruct

msgtmsg

multikeyhelp

tmultikeyhelp

nccalcsize_params

tnccalcsize_params

newtextmetric

tnewtextmetric

ofstruct

tofstruct

outlinetextmetric

toutlinetextmetric

paintstruct

tpaintstruct

paletteentry

tpaletteentry

panose

tpanose

pattern

tpattern

pointfx

tpointfx

pstr

pchar

pwstr

pwidechar

rasterizer_status

trasterizer_status

rgbquad

trgbquad

rgbtriple

trgbtriple

seginfo

tseginfo

short

smallint

short int

smallint

size

tsize

textmetric

ttextmetric

tpoint

tpoint

trect

trect

ttpolycurve

tttpolycurve

ttpolygonheader

tpolygonheader

uint

word

unsigned

word

unsigned char

byte

unsigned int

word

unsigned long

longint(dword)

unsigned long int

longint

unsigned short

word

unsigned short int

word

void*

pointer

windowplacement

twindowplacement

windowpos

twindowpos

wndclass

twndclass

word

word

C 和Delphi的資料型別對照表

c 和delphi的資料型別對照表 c c type objectpascal type unsigned short int word signed short int smallint unsigned int cardinal signed int integer uint longint w...

SQLServer MySql資料型別對照表

型別 sqlserver mysql 數值範圍 描述數值範圍 描述char 0 8000個字元 定長字串 0 255個字元 定長字串 nchar 0 4,000個字元 定長unicode字串 varchar 0 8000個字元 變長字串 0 255個字元 變長字串 nvarchar 0 4,000個...

Delphi資料型別

資料型別 1 常用型別 shortint char byte byte,unsigned short smallint short word unsigned short real48 6位元組浮點數 integer,longint int,long cardinal,longword dword ...