Description: This function closes and flushes any type of open stream and returns its own error code.
Returns: Boolean
Usage: Script
Format: CloseStream(Stream)
Parameters: Stream { Stream } { required } { no default: }
Any expression that returns a stream value.
Comments: The return value is true if the stream were successfully closed; invalid otherwise.
This function closes the stream passed to it. If the stream is invalid, or the stream is already closed, nothing happens.
Example:
If GetStreamLength(stream) == 0 && ! Valid(closeOK);
[
closeOK = CloseStream(stream);
]
This example checks to see if the stream has any data in it, and if it is empty and has not already been closed, closes it, setting closeOK to 1 if the stream were closed and invalid otherwise.
See Also: