Преглед изворни кода

* added typecast to get it compiling again

marco пре 21 година
родитељ
комит
1680140105
1 измењених фајлова са 6 додато и 3 уклоњено
  1. 6 3
      docs/refex/ex59.pp

+ 6 - 3
docs/refex/ex59.pp

@@ -1,13 +1,16 @@
 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;
     
 begin
   S:='Hello, World !';
-  P:=Ptr(Seg(S),Longint(Ofs(S)));
+  P:=pString(Ptr(Seg(S),Longint(Ofs(S))));
   {P now points to S !}
   Writeln (P^);
 end.