Pastafarianist

Pascal: writing reference to file

May 22nd, 2013
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.24 KB | None | 0 0
  1. program file_in;
  2.  
  3. type PInt = ^integer;
  4.  
  5. var file_var: file of PInt;
  6.     val: PInt;
  7.  
  8. begin
  9.     new(val);
  10.     val^ := 9001;
  11.  
  12.     assign(file_var, 'test.ref');
  13.     rewrite(file_var);
  14.     write(file_var, val);
  15.     //write(val);
  16.  
  17.     dispose(val);
  18. end.
Add Comment
Please, Sign In to add comment