Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/delphi/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C 如何将typedef联合翻译成delphi?_C_Delphi_Header Files - Fatal编程技术网

C 如何将typedef联合翻译成delphi?

C 如何将typedef联合翻译成delphi?,c,delphi,header-files,C,Delphi,Header Files,(一) (二) 谢谢。在德尔福角看一看这篇文章,它解释了变体记录,这正是您所需要的: 包含示例的摘录: typedef union __rfun_gop_event_info { unsigned int evt; struct { unsigned int reserved1:1; unsigned int reserved0:1; unsigned int f30:1; unsigned int f29:1; }frame; }rfun_gop_event_info

(一)

(二)


谢谢。

在德尔福角看一看这篇文章,它解释了变体记录,这正是您所需要的:

包含示例的摘录:

typedef union __rfun_gop_event_info
{
 unsigned int evt;
 struct
 {
  unsigned int reserved1:1;
  unsigned int reserved0:1;
  unsigned int f30:1;
  unsigned int f29:1;
 }frame;
}rfun_gop_event_info;

请使用“代码”功能来呈现您的代码示例。请检查这个问题-最麻烦的是-Object Pascal需要将不同的部分放在结构的末尾。您是否打算发布相同的代码块两次?也许第二个应该是不同的。位字段才是真正的问题
typedef union __rfun_gop_event_info
{
 unsigned int evt;
 struct
 {
  unsigned int reserved1:1;
  unsigned int reserved0:1;
  unsigned int f30:1;
  unsigned int f29:1;
 }frame;
}rfun_gop_event_info;
type
 TPerson = record
   FirstName, LastName: string[40];
   BirthDate: TDate;
   case Citizen: Boolean of
     True: (BirthPlace: string[40]);
     False: (Country: string[20];
       EntryPort: string[20];
       EntryDate: TDate;
       ExitDate: TDate);
 end;