瀏覽代碼

* 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.