adaFiles and I/O streams


The Ada standard library provides for I/O of traditional files of text or binary data, as well as I/O of streamed files. Files of binary data will be sequences of values of a type, while stream files can be sequences of values of possibly different types.

To read and write elements of different types from/to stream files, Ada uses subprograms denoted by types' attributes, namely 'Read, 'Write, 'Input, and 'Output. The latter two will read and write array bounds, record discriminants, and type tags, in addition to the bare input and output that Read and 'Write will perform.