next up previous contents index
Next: Sptr Up: Functions and Procedures Previous: Sin

SizeOf

   

Declaration:

Function SizeOf (X : Any Type) : Longint;

Description:

SizeOf Returns the size, in bytes, of any variable or type-identifier.

Remark: this isn't really a RTL function. Its result is calculated at compile-time, and hard-coded in your executable.

Errors:

None.

See also:

Addr

Example
Program Example63;

{ Program to demonstrate the SizeOf function. }
Var
  I : Longint;
  S : String [10];

begin
  Writeln (SizeOf(I));  { Prints 4  }
  Writeln (SizeOf(S));  { Prints 11 }
end.



Michael Van Canneyt
Thu Sep 10 14:02:43 CEST 1998