[fpc-pascal]How to know the size of a untype var parameter

Judison jueca at brturbo.com
Wed Dec 4 17:20:11 CET 2002


Hi all,

There is a way to know the size of a untype var param?

Something like this:

procedure MyProc(var A);
begin
  WriteLn('SizeOf(A) = ', SizeOf(A));
end;

but it always returns 4, as Data is a actually a pointer, SizeOf(A^) does not compile, SizeOf(Pointer(A)^), Pointer(A) is typecasting the data pointed by A... 

TIA
Judison




More information about the fpc-pascal mailing list