t66_files.pas 877 B

1234567891011121314151617181920212223
  1. program t66_files;
  2. { t66 -- FILE types: `text' and `file of T'. CALC.PAS:144 is
  3. MCFile : file of CellRec; -- File to store sheets in
  4. A file variable is our own control block (FileVarSize = 4 bytes: the DOS
  5. handle and a mode word), because this runtime does unbuffered INT 21h I/O
  6. where TP3 keeps a 128-byte buffer inside the variable - a recorded
  7. divergence. `file of T' parses its element type for the RECORD size a
  8. Read/Write moves (here 2 bytes, an Integer); `text' is one byte per element.
  9. This increment is the TYPES and the variable layout only. The file
  10. operations - Assign, Reset, Rewrite, Close, EndOfFile, IoResult, and
  11. read/write with a leading file argument - are the next one, and are loud
  12. (unknown identifier) until then, not silently wrong. }
  13. var
  14. t : text;
  15. g : file of Integer;
  16. begin
  17. writeln ('files declared')
  18. end.