PrintStatement ::= |
( print | println | flush | ( ( PrintArgument ),* |
Used by: |
This statement prints text content to output streams, files or pipes.
The print statement does not automatically do flushing, whereas println
does. flush works the same as print but flushes when printing is done.
The
These print statements supports flexible formatting, as shown in PrintArgument.
The print target by default is out , which is the standard system output
stream. Other system output streams are err (for error) and log (for
logging). Or it can be a file, opened by openTextFile(file_name,'w')
system function call, where 'w' means writing. A pipe is the input stream
for a command-line; this allows programs to write input to any command-lines.
See ExecStatement on this. The target can also be a simple variable,
in which case the statement will print into a string stored in that variable.
If the print target is not a text output stream, it prints into a new string and assigns to the variable.