1. Home
  2. OUTPUT directive

OUTPUT directive

Defines where output is to be stored or displayed.

Options

PRINT = string tokens Additions to output (dots, page, unchanged); default dots,page
DIAGNOSTIC = string tokens What diagnostic printing is required (messages, warnings, faults, extra, unchanged); default faul,mess,warn
WIDTH = scalar Limit on number of characters per record; default width of output file
INDENTATION = scalar Number of spaces to leave at the start of each line; default 0
PAGE = scalar Number of lines per page
STYLE = string token Style for future output to the channel (plaintext, formatted); default * i.e. unchanged

Parameter

    scalar Channel number of output file

Description

The OUTPUT directive changes the current output channel and thus re-defines where the output will be sent by the subsequent statements in a program, until another OUTPUT statement is given (excluding any statements that use a CHANNEL option to redirect their output). Thus

OUTPUT 2

PRINT X

PRINT [CHANNEL=3] Y

ANOVA X

sends the values of X, and the analysis of X by the ANOVA statement, to the file on the second output channel, and the values of Y to the file on the third.

The PRINT option controls two aspects of the output produced for example from statistical analyses: whether a line of dots is printed at the start, and whether the output begins on a new page; this can also be controlled by the OUTPRINT option of SET. Similarly, the DIAGNOSTIC option has exactly the same effect as the DIAGNOSTIC option of SET.

The WIDTH option specifies the maximum width to be used when producing output. The default value is the width specified when the file was opened, but you can subsequently decrease it; you cannot use OUTPUT to set the width to a greater value than that specified when the file was opened. The PAGE option allows you to reset the number of lines per page.

The STYLE option is relevant if the file on the channel has been opened in a style other than plain text. (The alternatives include HTML, RTF and LaTeX; see the OPEN directive). It allows you to switch between the “formatted” style that is used by default for these files, and the ordinary plain-text representation. If the STYLE option is not specified, the style is left unchanged.

Options: PRINT, DIAGNOSTIC, WIDTH, INDENTATION, PAGE, STYLE.

Parameter: unnamed.

See also

Directives: PRINT, OPEN, COPY.

Commands for: Input and output.

Example

" Example 1:3.2.3 " OUTPUT [WIDTH=72] 1
TEXT    [VALUES=\
        'Notice that, in plain text captions, Genstat reformats the',\
        'lines of the text to fill each line of output and start',\
        'the next line at the end of a word.'] Text
CAPTION [PFIRST=dots] 'Major heading','Minor heading',Text;\
        STYLE=major,minor,plaintext
Updated on June 19, 2019

Was this article helpful?