fork download
  1. program test;
  2.  
  3. type Ptr = ^Integer;
  4.  
  5. var x, y : Ptr;
  6.  
  7. procedure Print(n : Integer; x, y : Ptr);
  8. begin WriteLn(n, '. x = ', x^:8, ', y = ', y^:8) end;
  9.  
  10. begin
  11. x := New(Ptr);
  12. y := x;
  13. Print(1, x, y);
  14. Inc(x, -1);
  15. Print(2, x, y);
  16. x^ := 123;
  17. Print(3, x, y);
  18. Dispose(y);
  19. end.
Runtime error #stdin #stdout 0s 308KB
stdin
stdout
1. x =   -20436, y =   -20436
2. x =        1, y =   -20436
3. x =      123, y =   -20436
Runtime error 216 at $0805C3FB
  $0805C3FB
  $080637A3