t38_readbool.pas 665 B

12345678910111213141516
  1. program t38;
  2. (* TP3 refuses a boolean I/O with error 66 ("I/O not allowed here",
  3. TPSRC8 prderrtp) and its runtime has no boolean reader at all -- xrdreal,
  4. xrdchar, xrdint and xrdbyte exist; xrdbool does not. A BOOLEAN is one
  5. byte, so an accepted read would be a two-byte store into it, and the
  6. second of those bytes is the byte that follows the variable.
  7. The position pinned in expected.tsv is the ')' after b: IoCall has parsed
  8. the whole argument, and the atom parser has already skipped the whitespace
  9. after it, so the parser stands on the ')' when IoCall dispatches on the
  10. variable's class. *)
  11. var
  12. b : boolean;
  13. begin
  14. readln (b)
  15. end.