Browse Source

* added typecast to get it compiling again

marco 21 years ago
parent
commit
1680140105
1 changed files with 6 additions and 3 deletions
  1. 6 3
      docs/refex/ex59.pp

+ 6 - 3
docs/refex/ex59.pp

@@ -1,13 +1,16 @@
 Program Example59;
 Program Example59;
 
 
-{ Program to demonstrate the Ptr function. }
+{ Program to demonstrate the Ptr (compability) function. 
+}
 
 
-Var P : ^String;
+type pString = ^String;
+
+Var P : pString;
     S : String;
     S : String;
     
     
 begin
 begin
   S:='Hello, World !';
   S:='Hello, World !';
-  P:=Ptr(Seg(S),Longint(Ofs(S)));
+  P:=pString(Ptr(Seg(S),Longint(Ofs(S))));
   {P now points to S !}
   {P now points to S !}
   Writeln (P^);
   Writeln (P^);
 end.
 end.