Previous Next

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:
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.
 
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 
*
*
*
See also 
EDITING phrase

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.