mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-05-19 06:02:31 +02:00
17 lines
261 B
ObjectPascal
17 lines
261 B
ObjectPascal
Program Example59;
|
|
|
|
{ Program to demonstrate the Ptr (compability) function.
|
|
}
|
|
|
|
type pString = ^String;
|
|
|
|
Var P : pString;
|
|
S : String;
|
|
|
|
begin
|
|
S:='Hello, World !';
|
|
P:=pString(Ptr(Seg(S),Longint(Ofs(S))));
|
|
{P now points to S !}
|
|
Writeln (P^);
|
|
end.
|