tparm Subroutine
Purpose
Applies parameters (padding) to a terminal capability.
Library
Curses Library (libcurses.a)
Syntax
Description
The tparm subroutine applies parameters (padding) to a terminal capability.
Note: If the tparm subroutine
is called with less than 10 paramameters, then the -D_TPARM_COMPAT option
should be used when compiling the program. Otherwise the compiler
gives the following error.
1506-098 (E) Missing argument(s)
Parameters
Item | Description |
---|---|
Parm# | Specifies the parameters (up to nine) to instantiate. |
TermCap | Specifies the terminal capability to apply the parameters to. These terminal capabilities are defined in the term.h file. |
Return Values
The tparm subroutine returns the escape sequence specified by the TermCap parameter with the specified parameters applied. After the escape sequence is received, it can be output by a subroutine like the tputs (tputs Subroutine) subroutine.
Examples
- To save the escape sequence used to home the cursor in the user-defined
variable home_sequence, enter:
home_sequence = tparm(cursor_home);
- To save the escape sequence used to move the cursor to the coordinates
X=40, Y=18 in the user-defined variable move_sequence,
enter:
move_sequence = tparm(cursor_address, 18, 40);