> Hallo,
>
> i know this is not exactly question to this maillist but
> maybe somebody could help me how can i convert only the following
> definition of "reg_drq_block_call_back" into FPC Pascal notation:
>
> void ( * reg_drq_block_call_back ) ( struct REG_CMD_INFO * );
>
> where definition is
>
> struct REG_CMD_INFO
> {
>    unsigned char cmd;
>    ... etc.
> } ;
>
> struct REG_CMD_INFO reg_cmd_info;
>
> ("struct" is simply converted to "record", that is not the problem)

Pascal style:

type
  REG_CMD_INFO = record
    cmd : byte;
  end;

  reg_drq_block_call_back = procedure(var r:REG_CMD_INFO);

or more close to C style with pointers:

type
  REG_CMD_INFO = record
    cmd : byte;
  end;
  REG_CMD_INFO = ^REG_CMD_INFO;

  reg_drq_block_call_back = procedure(pr:PREG_CMD_INFO);



_______________________________________________
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to