Overview Module Function Class Tea 3.1.0 Reference Documentation
© 2002 PDM&FC

Class TOutput

Instances of TOutput represent an output stream. TOutput is only used as base class for other classes. It is not possible to create instances of it.

Method Summary
close
         Closes the output stream represented by the object.
flush
         Flushes the internal buffers by sending its contents into the output stream.
printf formatString [arg1 ...]
         Outputs a string built from a template string, in the same way as the C printf function.
setLineBuffering flag
         Sets the buffering mode
write [arg1 ...]
         Sends the contents of a string into the underlying output stream.
writeln [arg1 ...]
         Sends the contents of a string into the underlying output stream followed by an "end of line" sequence.

Method Detail

close

TOutput close

Closes the output stream represented by the object.

Returns:
A reference to the object it was called for.

Closing the stream releases all the underlying operating system resources. After closing the stream no more methods may be called.

flush

TOutput flush

Flushes the internal buffers by sending its contents into the output stream.

Returns:
A reference to the object it was called for.


printf

TOutput printf formatString [arg1 ...]

Outputs a string built from a template string, in the same way as the C printf function.

Parameters:
formatString - A string object representing the format string in the way of the C printf function.
arg1 - Object of type dependent on the format string.


setLineBuffering

TOutput setLineBuffering flag

Sets the buffering mode

Parameters:
flag - A boolean object signaling if the buffering mode should be line buffered.
Returns:
A reference to the object it was called for.

By default all the TOutput objects are opened in fully buffered mode. When this method is called with a flag argument of true, then the buffering mode is set to line buffered. In line buffered mode, after a call to the TOutput writeln method a flush is implicitly performed. When flag is false then the stream is set to fully buffered mode.

write

TOutput write [arg1 ...]

Sends the contents of a string into the underlying output stream.

Parameters:
arg1 - The object to be written. It may be either a string, integer or float object.
Returns:
A reference to the object it was called for.

This methods concatenates the contents of its arguments and sends the the result to the underlying stream. If one of the arguments is an integer or a float than its decimal representation is used.

writeln

TOutput writeln [arg1 ...]

Sends the contents of a string into the underlying output stream followed by an "end of line" sequence.

Parameters:
arg1 - The object to be written. It may be either a string, integer or float object.
Returns:
A reference to the object it was called for.

This methods concatenates the contents of its arguments and sends the the result to the underlying stream. If one of the arguments is an integer or a float than its decimal representation is used. After writing all of the arguments it sends an "end of line" sequence.


Overview Module Function Class Tea 3.1.0 Reference Documentation
© 2002 PDM&FC
Report a bug or request new features
© 2002