STDOUT statement

Purpose

Output a string expression to the standard output device (console/screen).

Syntax

STDOUT string_expression [;]

Remarks

Output to STDOUT can be redirected to a file or a device.  If redirection is not in effect, output is sent to the current active console page.  If a PAGE statement is not in effect, STDOUT will write to console page 1.

If a trailing semi-colon after string_expression is not present, a carriage return and linefeed (CR/LF, $CRLF, or CHR$(13,10)) are sent immediately after string_expression.

Any control codes such as Carriage Return, Line Feed and Backspace embedded in string_expression will be interpreted appropriately if standard output is not redirected.  That is, CR ($CR or CHR$(13)) causes the caret to move back to the beginning of the current line; LF ($LF or CHR$(10)) causes the caret to the next line; and Backspace ($BS or CHR$(8)) causes the caret to move back one character position.

If non-redirectable output is required, use the PRINT statement instead.

Restrictions

STDOUT is not compatible with Pipes.  The current active page can be determined with the PAGEACTIVE function.

See also

CONSIN, CONSOUT, GETSTDERR, GETSTDIN, GETSTDOUT, PAGE, PAGEACTIVE, PAGEVISIBLE, PCOPY, PRINT, STDEOF, STDERR, STDIN LINE