c->pascal问题 (50分)

  • 主题发起人 主题发起人 lxmzm
  • 开始时间 开始时间
L

lxmzm

Unregistered / Unconfirmed
GUEST, unregistred user!
struct buf {
unsigned char *pnt;
long size;
long pos;
struct buf *next;
struct buf *prev;
};
如何翻译为PASCAL语言?
 
PBuf = ^TBuf;
TBuf = record
pnt :PChar;
size :Integer;
pos :Integer;
next :PBuf;
prev :PBuf;
end;
 
type
PBuf=^Buf;
Buf=record
pnt:^Byte;
size:Integer;
pos:Integer;
next:PBuf;
prev:PBuf;
end;
 
是个双向链表的结构
 
typedef struct {
unsigned long fileposition;
unsigned char val[2];
} wbuffer;
/* Yes, yes, I know I shoulddo
something about these globals */
wbuffer writebuffer[WRITEBUFFERSIZE];
如何翻译!
 
type
buf = record
pnt: PByte;
size: LongInt;
pos: LongInt;
next: PBUF;
prev: PBUF;
end;

type
wbuffer = record
fileposition: LongInt;
val: Array[0..2-1] of Byte;
end;
 
这一句wbuffer writebuffer[WRITEBUFFERSIZE];???
 
writebuffer:Array[0..WRITEBUFFERSIZE-1] of wbuffer ;
 
多人接受答案了。
 

Similar threads

S
回复
0
查看
1K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
625
import
I
D
回复
0
查看
1K
DelphiTeacher的专栏
D
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
后退
顶部