C cAkk Unregistered / Unconfirmed GUEST, unregistred user! 1999-10-19 #2 这个好像不太好办. union类型常用于直接和系统底层打交道,而delphi对这个不擅长.
A Alarm Unregistered / Unconfirmed GUEST, unregistred user! 1999-10-19 #3 union并不好用,好象也没有太大必要,为什么要用这个东东呢?
Y yjshi Unregistered / Unconfirmed GUEST, unregistred user! 1999-10-19 #4 Object Pascal中的变体记录类型,就相当于C中的Union类型, 请参见Delphi的帮助
D dongliu Unregistered / Unconfirmed GUEST, unregistred user! 1999-10-19 #5 类比一下: c: union{struct {handle hmem; dword dwreserved[3];}block; struct{dword dwcommittedsize;dword dwuncommittedsize; lpvoid lpfirstblock;lpvoid lplastblock;}region; }; delphi: case integer of 0block:record hmem:handle; reserved:arrary[0..2] of dword;end); 1region:record dwcommittedsize:dword;dwuncommittedsize:dword; lplastblockointer;lpfirstblockointer;end);
类比一下: c: union{struct {handle hmem; dword dwreserved[3];}block; struct{dword dwcommittedsize;dword dwuncommittedsize; lpvoid lpfirstblock;lpvoid lplastblock;}region; }; delphi: case integer of 0block:record hmem:handle; reserved:arrary[0..2] of dword;end); 1region:record dwcommittedsize:dword;dwuncommittedsize:dword; lplastblockointer;lpfirstblockointer;end);
C cytown Unregistered / Unconfirmed GUEST, unregistred user! 1999-10-20 #6 可以, 没问题, 如果要详细解释看delphi4编程大全这本书, 解释得非常清楚. 我已经上传了. (http://www.gislab.ecnu.edu.cn/delphibbs/dispq.asp?LID=143386)
可以, 没问题, 如果要详细解释看delphi4编程大全这本书, 解释得非常清楚. 我已经上传了. (http://www.gislab.ecnu.edu.cn/delphibbs/dispq.asp?LID=143386)
C cAkk Unregistered / Unconfirmed GUEST, unregistred user! 1999-10-20 #7 cytown: 我到你的下载地址下载了这本书,但是好像zip文件是坏的?你检查过吗?