[next] [prev] [prev-tail] [tail] [up]

#### Ptr

Declaration:
  Function Ptr (Sel,Off : Longint) : Pointer;
Description:
  Ptr returns a pointer, pointing to the address specified by segment Sel and offset Off.

  Remark:

  1. In the 32-bit flat-memory model supported by Free Pascal, this function is obsolete.
  2. The returned address is simply the offset.
Errors:
  None.
See also:
  Addr (451)

Listing: refex/ex59.pp

Program Example59;
{ Program to demonstrate the Ptr function. }
Var P : ^String;
S : String;
begin
S:='Hello, World !';
P:=Ptr(Seg(S),Longint(Ofs(S)));
{P now points to S !}
Writeln (P^);
end.

[next] [prev] [prev-tail] [front] [up]