The TERMINAL_SIZE function allows you to set and retrieve the column width and number of lines that are used for IDL output to the console. This function works for either the Console View in the IDL Workbench or the "tty" terminal shell for command-line IDL. The column width is used by IDL for formatting output from PRINT and from error messages. The number of lines is used when the !MORE system variable is in effect.

Note: By default, IDL automatically adjusts the column width and lines to match the current width and height of the Workbench's Console View or the terminal shell. Calling this function does not disable that behavior. If you call TERMINAL_SIZE, and then later resize the Workbench or your shell, the new settings will override your own values.

Examples


r = TERMINAL_SIZE(80)  ; change columns to 80 characters
r = TERMINAL_SIZE(80, 24)  ; change columns to 80, lines to 24
r = TERMINAL_SIZE(-1, 40)  ; leave columns alone, change lines to 40
r = TERMINAL_SIZE( )  ; just retrieve the current [columns, lines]

Syntax


Result = TERMINAL_SIZE( [Columns [, Lines]] )

Return Value


Returns a two-element array containing the current [columns, lines].

Arguments


Columns

Set this optional argument to an integer giving the column width in characters. The minimum value is 20. Set this argument to -1 to avoid changing the current value (for example, to set just the Lines).

Lines

Set this optional argument to an integer giving the number of lines. The minimum value is 10. Set this argument to -1 to avoid changing the current value.

Keywords


None.

Version History


8.2.3

Introduced

See Also


!MORE, SPAWN