c語言的函式格式與delphi不同,它們是函式返回型別在前,函式宣告在後.對於沒有任何返回型別的函式則定義為void型別.
例如:delphi中函式function myfunction:(intin:integer):bool;相應的c語言**就變成bool myfunction(int intin);又例如procedure myprocedure;====>void myprocedure;採用這種方法,一般要求對c語言比較熟悉.我一般是採用這種方法.下面是我收集整理的自己常用的delphi與c之間的型別對應 表.其中左邊是c型別,右邊是對應的delphi型別
abc -> tabc
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
dcb -> tdcb
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
int -> integer
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
msg -> tmsg
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 -> **allint
short int -> **allint
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
sqlserver 與 c 型別對應
sql server型別 c 型別 bitbool tinyint byte smallint short intint bigint long real float float double money decimal datetime datetime char string varchar s...
MS SQL 型別對應C 型別
序號 類別 sqlserver c sharp 備註 1 整數 bit boolean true 轉換為1false轉換為0 2 tinyint byte c sharp 資料型別都位於system命名空間 3 smallint int16 4 intint32 5 bigint int64 6 s...
C 與pascal的區別
最近,我開始轉c 了,這是一件非常不容易的事!我發現,原來c 和pascal有許多本質上的區別,例如 1.c 要打頭檔案 2.c 的主程式與函式沒個兩樣,也就是說 主程式 函式,因為主程式一般都是這樣寫的 int main 這不就是個函式嗎?3.c 比pascal的執行速度快了很多很多。4.c 的邏...