Output to file not open for writing

Official Description

6.6.5.2 It is an error if the file mode is not generation immediately prior to any use of put, write, writeln or page.

Simplified Description

In other words, it is an error to perform output on a file which is not open for writing (i.e. the file is either not open or open for reading).

Error Handling

This error is reported if I/O checking is enabled.