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 " : ECHO OFF PROMPT "" INPUT @(5,10) PASSWORD : ECHO ON 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. |