INPUT CLEAR statement Clears any keystrokes buffered from the keyboard, discarding any type-ahead characters. The INPUT CLEAR statement is useful when you want to make sure the AVM clears out extra characters in the input statement that could follow a field entry that is too long. Note: Does not apply to SpeedScript programming. Syntax INPUT CLEAR Example This menu procedure tests each key the user presses. If the user presses a key other than 1, 2, or 3, the AVM clears the keyboard buffer and displays a message. r-inclr.p DISPLAY " Please choose " SKIP " 1 Run order entry " SKIP " 2 Run receivables " SKIP " 3 Exit " WITH CENTERED FRAME menu. REPEAT: READKEY. IF LASTKEY = KEYCODE("1") THEN RUN ordentry. ELSE IF LASTKEY = KEYCODE("2") THEN RUN receive. ELSE IF LASTKEY = KEYCODE("3") THEN QUIT. ELSE DO: MESSAGE "Sorry, that is not a valid choice". INPUT CLEAR. END. END. Notes In Windows, the keyboard type-ahead buffer can contain a maximum of 16 characters. If the current input source is not the keyboard, the INPUT CLEAR statement has no effect. INPUT CLEAR is not available on the Windows GUI platform after Progress Version 7.3D. It is available in Windows character and non-Windows GUI or character platforms. See also EDITING phrase
INPUT CLEAR
DISPLAY
" Please choose " SKIP
" 1 Run order entry " SKIP
" 2 Run receivables " SKIP
" 3 Exit " WITH CENTERED FRAME menu.
REPEAT:
READKEY.
IF LASTKEY = KEYCODE("1") THEN RUN ordentry.
ELSE
IF LASTKEY = KEYCODE("2") THEN RUN receive.
IF LASTKEY = KEYCODE("3") THEN QUIT.
ELSE DO:
MESSAGE "Sorry, that is not a valid choice".
INPUT CLEAR.
END.