Sign in Join
FPDoc Onlineexperiment

Seg function

In unit System

Return segment.

Declaration

pascal
function Seg(var X): LongInt

Description

Seg returns the segment of the address of a variable. This function is only supported for compatibility. In Free Pascal, it returns always 0, since Free Pascal uses a flat 32/64 bit memory model. In such a memory model segments have no meaning.

Errors

None.

See also

Example: ex60

pascal
Program Example60;

{ Program to demonstrate the Seg function. }
Var
  W : Word;

begin
  W:=Seg(W);  { W contains its own Segment}
end.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.