PRINTERR, INPUTERR |
|
|
The PRINTERR statement displays an error message which is removed from the screen when the next input is entered.
The synonym INPUTERR can be used in place of PRINTERR.
Format
PRINTERR expr
where
The expr text is displayed on the bottom line of the screen using the current foreground and background colours. This message will be removed after the first keystroke of the next INPUT @ statement. Input taken from the DATA queue will also clear the message.
Example
LOOP DISPLAY "Enter password " : PROMPT "" INPUT @(5,10) PASSWORD : HIDDEN WHILE PASSWORD # "SECRET" PRINTERR "Incorrect password" REPEAT
This program fragment reads a password from the keyboard. If it is entered incorrectly, a message is displayed and the input is repeated. Note use of the HIDDEN qualifier in the INPUT statement so that data entered at the keyboard is displayed as asterisks. |