Product SiteDocumentation Site

5.2.4.23. state


>>-state-------------------------------------------------------><

Returns a string indicating the current stream state.
The returned strings are as follows:
ERROR
The stream has been subject to an erroneous operation (possibly during input, output, or through the STREAM function). See Section 14.5, “Errors during Input and Output”. You might be able to obtain additional information about the error with the description method or by calling the STREAM function with a request for the description.
NOTREADY
The stream is known to be in such a state that the usual input or output operations attempted upon would raise the NOTREADY condition. (See Section 14.5, “Errors during Input and Output”.) For example, a simple input stream can have a defined length. An attempt to read that stream (with CHARIN or LINEIN, perhaps) beyond that limit can make the stream unavailable until the stream has been closed (for example, with LINEOUT(name)) and then reopened.
READY
The stream is known to be in such a state that the usual input or output operations might be attempted. This is the usual state for a stream, although it does not guarantee that any particular operation will succeed.
UNKNOWN
The state of the stream is unknown. This generally means that the stream is closed or has not yet been opened.