An invalid stream modifier was encountered.

#2085   Compile-time error

An invalid stream modifier was encountered.

Additional Information

The modifier is 'X', the stream is 'Y'.
    or
A buffer cannot appear with the 'REFERENTS-ALLOWED' modifier.
    or
A referent cannot appear with the 'REFERENTS-ALLOWED' modifier.

Recovery

Compilation continues but no compiled source code file will be saved.

Explanation

Certain streams are not allowed to be opened, reopened, or written to with certain modifiers. The only time the REFERENTS-ALLOWED modifier is allowed is when a stream is opened as a file. This is the only time it makes sense, since the referent values are not determined until processing has finished; by this time the buffers and referents can no longer be used, but the files are still around.