开发者

Delphi, Noob Questions #2

In the following piece of code :

type
    TDoubleDWORD = record
    L, H: Longint;
  end;
function BitSelection(const Block: Integer; const A;
                      const ASize: Integer): Longint;
var
  H, L: Longint;
begin
  H := TDoubleDWORD(Block).H;
  L := TDoubleDWORD(Block).L;

My Questions Are :

1) What is the type of parameter A ?

2) What does 'TDoubleDWORD(Block)' mean ? Is that some sort of constructor for the record TDoubleDWORD ?

Sorry if the questions seem trivial but I'm pretty new to delphi and goo开发者_开发问答gle isn't much help.


  1. Untyped / typeless parameters in Delphi
  2. Its a cast.


A is an untyped parameter. Here is question about that with link to an article.

TDoubleDWORD(Block) is a typecast to TDoubleDWORD.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜