Search code examples
delphisyntax

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 the Delphi Programming Language and Google isn't much help.


Solution

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