开发者

Delphi, Noob Questions #2

开发者 https://www.devze.com 2023-02-14 20:16 出处:网络
In the following piece of code : type TDoubleDWORD = record L, H: Longint; end; function BitSelection(const Block: Integer; const A;

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

精彩评论

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

关注公众号