Top  Previous  Next


The TERM command specifies the terminal display dimensions.






TERM  { columns } { , lines } { , prt.cols } { , prt.lines } {term.type}

TERM COLOUR  { bgc} { , fgc}





columnsis the width of the display device.
linesis the depth (number of lines) of the display device.
prt.colsis the width (number of columns) of the default printer.
prt.linesis the depth (number of lines) of the default printer.
bgcis the required background colour
fgcis the required foreground colour



The TERM command with no qualifying information reports the display device settings. It shows the page width and depth together with the terminal type (as in the @TERM.TYPE variable).


The four numeric parameters (columns, lines, prt.cols and prt.lines) are all optional. The intervening commas must be included except after the final used parameter. The columns and lines values specify the page shape of the display device. The prt.cols and prt.lines values apply to the default printer. The value of any parameter that is not included in the command remains unchanged. If used for a console session or a QMTerm connection with values of columns and lines less than 256, the command will also set the device window to the given shape.


The columns values must be in the range 20 to 32767. The lines values must be in the range 10 to 32767.


The term.type option selects the terminal device type. Note that there is no comma before the terminal type. The name given must correspond to an entry in the terminfo library.



The COLOUR (or COLOR) option can be used to set the background and foreground colours. The colour names are case insensitive and chosen from BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, WHITE, GREY, BRIGHT BLUE, BRIGHT GREEN, BRIGHT CYAN, BRIGHT RED, BRIGHT MAGENTA, YELLOW, BRIGHT WHITE. The American spelling GRAY can be used in place of GREY and the two word names can be written with either a space or a dot between the words.


Note that some terminal emulators only apply the background colour to characters output by the application, not to the entire window. Thus clearing the screen, for example, may lead to unexpected results.



The TERM DEFAULT command resets the device to 80 x 24. The printer characteristics are unaffected.



The TERM DISPLAY command displays a list of the more important input key codes and output control sequences for the currently selected terminal type in terminfo format.





TERM 120,32


The above command sets the terminal to be 120 columns wide by 32 lines. If the default printer was set to be 132 columns and 66 lines per page, a subsequent TERM command with no qualifying information would report


Screen width : 120

Screen depth : 32

Printer width: 132

Printer depth: 66

Terminal type: QMTERM



TERM ,,120,66


The above command sets the default printer to be 120 columns wide by 66 lines.



See also: