The INPUT CTRL statement is used to toggle on or off the suppression of control characters in input.
Format
INPUT CTRL [ON | OFF] |
Description
When enabled (INPUT CTRL ON), control characters entered by the user are ignored, with the exception of the standard editing control characters listed below. To acknowledge all control characters, use the INPUT CTRL OFF statement.
Characters Unaffected by INPUT CTRL
Character |
Function |
CTRL+H |
Erase one character |
CTRL+J |
Linefeed |
CTRL+M |
Carriage return |
CTRL+R |
Redisplay current input field |
CTRL+W |
Erase one word |
CTRL+X |
Clear entire input |
CTRL+/ |
Sub-value mark |
CTRL+] |
Value mark |
CTRL+^ |
Attribute mark |
The usage of ON and OFF in the INPUT CTRL statement is opposite in effect to that in the BREAK statement. That is, INPUT CTRL ON disables control characters, while BREAK ON enables the BREAK key.
Example
In this example the user is asked to enter a street address. To ensure that no control character appears in the address, the INPUT CTRL ON statement is first used.
PRINT "ENTER YOUR STREET ADDRESS" INPUT CTRL ON INPUT ADDRESS |
See Also