線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:673
推到 Plurk!
推到 Facebook!

有关 c 转成 delphi的问题

尚未結案
gqlv
一般會員


發表:18
回覆:10
積分:5
註冊:2003-07-23

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-08-27 17:24:11 IP:218.104.xxx.xxx 未訂閱
c的机构如下 struct g72x_state { long yl; short dml; short a[2]; char td; }; delphi 这样写对吗? g72x_state=record yl:longint; short:word; a:array[0..2] of word; td:char; end; c里的函数 void sound_encode(short *data,unsigned char *out_byte,int longth,struct g72x_state state1) 在delphi 里应该这样写?
領航天使
站長


發表:12216
回覆:4186
積分:4084
註冊:2001-07-25

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-08-29 00:19:15 IP:211.76.xxx.xxx 未訂閱
引言: c的机构如下 struct g72x_state { long yl; short dml; short a[2]; char td; }; delphi 这样写对吗? g72x_state=record yl:longint; short:word; a:array[0..2] of word; td:char; end; c里的函数 void sound_encode(short *data,unsigned char *out_byte,int longth,struct g72x_state state1) 在delphi 里应该这样写?
type g72x_state=record yl:longint; dml:word; a:array[0..1] of word; td:char; end; procedure sound_encode(var data:word;var out_byte:char;longth:integer;state1:g72x_state); ~~~Delphi K.Top討論區站長~~~
------
~~~Delphi K.Top討論區站長~~~
syntax
尊榮會員


發表:26
回覆:1139
積分:1258
註冊:2002-04-23

發送簡訊給我
#3 引用回覆 回覆 發表時間:2003-08-30 03:51:05 IP:61.70.xxx.xxx 未訂閱
簡單對照表 1. long --> LongInt unsigned Long --> LongWord short --> SmallInt unsigned short --> Word char --> Char or ShortInt byte --> Byte 2. short a[2] ---> a[0] ~ a[1] ---> A: array[0..1] of SmallInt; short b[13] ---> a[0] ~ a[12] ---> A: array[0..12] of SmallInt;
系統時間:2024-05-18 22:20:24
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!