| 1234567891011121314151617181920 |
- program t70_kbd;
- { t70 -- Read(Kbd, Ch): a READ with a leading FILE argument. CALC.INC is full
- of `Read(Kbd, Ch)' (8 times) and `KeyPressed'.
- `Kbd' is the predefined console keyboard, modelled as a TEXT file. This
- runtime's read entries already read the console, so the leading file is
- DROPPED and the remaining arguments are read exactly as `Read(Ch)' would be.
- A real file variable in that position is a loud ENoLib, not a silent read
- into the file variable's own bytes.
- The .in is `Z'; the .out is `Z' + CRLF. Read (not ReadLn) leaves the newline
- pending, and the writeln after it adds the CRLF. }
- var
- ch : char;
- begin
- Read (Kbd, ch);
- writeln (ch)
- end.
|