PTERM

Top  Previous  Next

 

The PTERM command sets or displays terminal characteristics.

 

 

Format

 

PTERM BINARY { ONOFF }

PTERM BREAK { ONOFF }

PTERM BREAK { n | ^c }

PTERM CASE { INVERTNOINVERT }

PTERM NEWLINE { CRLFCRLF }

PTERM PROMPT "string1" { "string2" }

PTERM RESET string

PTERM RETURN { CRLF }

PTERM DISPLAY

PTERM LPTR

 

Multiple options from the above may be included in a single command.

 

 

The PTERM BINARY ON or OFF command determines whether terminal input/output is processed by QM to handle special character transformation rules appropriate to a telnet connection. When binary mode is enabled, all data is passed in.out without any modification.

 

The PTERM BREAK ON or OFF command determines whether use of the break key is considered to be a break or a data character. If set on, the break key will interrupt processing. If set off, the break key is treated as a normal data character. The setting of this mode does not affect interpretation of the telnet break command.

 

The PTERM BREAK n or ^c command sets the character to be used as the break key. The first form takes the character number (1 - 31); the second form takes the printable character associated with the control key (A - Z, [, \, ], ^, _). The default break character is ctrl-C (character 3). Note that some terminal emulators send a telnet negotiation parameter instead of the break character itself and may require changes to the emulator configuration to use an alternative character.

 

The PTERM CASE command determines whether the case of alphabetic characters is inverted on entry at the keyboard. Running with case inversion enabled may be more natural as, for historic reasons, the QM command set is all in upper case. In QMBasic programs, case inversion affects INPUT statements, the KEYCODE() and KEYINC() functions but not the KEYIN() function.

 

The PTERM NEWLINE command determines whether QM sends CR, LF or a CR/LF pair as the newline sequence on terminal output. The default mode is CRLF.

 

The PTERM PROMPT command changes the command prompt from the default colon to string1. The optional string2 changes the alternative prompt displayed when the default select list is active. The prompt strings must be quoted and may be from 1 to 10 characters in length.

 

The PTERM RESET command sets a control string to be sent to the terminal device on return to the command prompt. This can be used, for example, to ensure that the terminal reverts to a chosen foreground/background colour scheme regardless of how the application left it set. The string may include use of the QMBasic style @() function to insert device dependent control codes or any of the following special codes:

\BBackspace
\EEscape
\FForm feed
\NNewline
\RCarriage return
\TTab
\^^
\\\
^xCtrl-x

 

The PTERM RETURN command determines whether KEYIN() and related QMBasic functions return 10 (LF) or 13 (CR) when the return key is pressed. The actual effect of this mode setting is to replace incoming carriage returns with the given character unless the session is operating over a binary mode telnet connection. The default mode is CR.

 

The PTERM DISPLAY command reports the current settings of the terminal. PTERM LPTR directs the same report to the default printer.