next up previous contents index
Next: Ord Up: Functions and Procedures Previous: Odd

Ofs

   

Declaration:

Function Ofs Var X : Longint;

Description:

Ofs returns the offset of the address of a variable.

This function is only supported for compatibility. In Free Pascal, it returns always the complete address of the variable, since Free Pascal is a 32 bit compiler.

Errors:

None.

See also:

DSeg, CSeg, Seg, Ptr

Example
Program Example44;

{ Program to demonstrate the Ofs function. }

Var W : Pointer;


begin
  W:=Pointer(Ofs(W)); { W contains its own offset. } 
end.



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