# Transput

At various points you have been reading external values from the keyboard and displaying internal values on the screen. This chapter addresses the means whereby an Algol 68 program can obtain external values from other sources and send internal values to places other than the screen. straightening is the only new language construct involved and all the matters discussed are available in the standard prelude.

Algol 68 transput gives the first taste of “event-driven programming”. In effect, all programs are event-driven, but simple programs are driven only by the originating event: that is, the initiation of the program. In other words, simple programs, once started, run to completion, unless, of course, they contain errors. Event-driven programs, however, are dependent on the occurrence of events which are outwith the control of the program. We shall be examining later the kinds of event which can affect your programs if they read or write data.

Subsections

- Books, channels and files
- Reading books
  - Exercises
- Writing to books
  - Exercises
- String terminators
  - Exercises
- Events
  - Logical file end
  - Physical file end
  - Value error
  - Char error
  - Exercises
- The command line
  - Exercises
- Environment strings
  - Exercises
- Writing reports
  - Exercises
- Binary books
  - Exercises
- Internal books
- Other transput procedures
  - Exercises
- Summary
  - Exercises