Unit 'System' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

Ofs

Return offset of a variable.

Declaration

Source position: system.fpd line 57

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/64 bit compiler.

Errors

None.

See also

DSeg

  

Return data segment.

CSeg

  

Return code segment.

Seg

  

Return segment.

Ptr

  

Combine segment and offset to pointer.

Example

Program Example44;

{ Program to demonstrate the Ofs function. }

Var W : Pointer;


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

Documentation generated on: Oct 02 2024