| System Functions |
|
| Format | 1.
Return CTL Definition: CTL(chan,input[$][,ERR=stmtref]) 2. Return Input Sequence: CTL(READ chan,ctlval[,ERR=stmtref]) Where:
|
|||||||||||||
| Returns | CTL code associated with input, or input sequence associated with CTL. | |||||||||||||
| Description | The
CTL( ) function is designed for use in
programs that interact directly with the terminal. It
provides access to the CTL lookup tables maintained
internally in ProvideX. When an input sequence is passed to CTL( ), it returns the CTL values associated with the input; e.g., PRINT CTL(0,$000002e$) returns -1007. When a CTL value is passed to CTL(READ ..), it returns the input sequence associated with the control. |
|||||||||||||
| See Also | DEFCTL
Directive Negative CTL Definitions |
|||||||||||||
| Examples | The
following example reads an uppercase string intoY$
without editing and stops on a CTL value > 0:
In the example below, the CTL( ) function returns a string value containing a list of control sequences for a specified CTL value. The string is made up of a series of fields where the 1st byte preceding each field indicates the number of characters in the control sequence; the rest of the field shows the actual control sequence. To print control sequences for function keys F1 through F4 :
|
|||||||||||||
| 4 1B | 000073 | 00FF82 | DONE | |||||||||||
| If the expression is numeric, ProvideX returns any alternate CTL value that has been assigned; e.g., PRINT CTL(0,$000070$) returns 1 (CTL=1 or the F1 key). |
||||||||||||||