next up previous contents index
Next: Append Up: Functions and Procedures Previous: Abs

Addr

   

Declaration:

Function Addr (X : Any type) : Pointer;

Description:

Addr returns a pointer to its argument, which can be any type, or a function or procedure name. The returned pointer isn't typed. The same result can be obtained by the @ operator, which can return a typed pointer (Programmer's guide\).

Errors:

None

See also:

SizeOf

Example
Program Example2;

{ Program to demonstrate the Addr function. }

Const Zero : integer = 0;

Var p : pointer;
    i : Integer;

begin
  p:=Addr(p);     { P points to itself }
  p:=Addr(I);     { P points to I }
  p:=Addr(Zero);  { P points to 'Zero' }
end.



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