The INPUTCLEAR statement clears the type-ahead buffer for the line linked to the process executing the program.
Format
INPUTCLEAR TA CLEAR |
Description
The INPUTCLEAR statement is identical to the TA CLEAR statement. Any data in the type-ahead buffer is erased.
See TA Statement for more information on the type-ahead buffer.
Example
In this application a subroutine GO.CALC is called, which may take several minutes to execute. The user can become impatient during this time and attempt to abort the program by typing control sequences. The GO.CALC subroutine is therefore followed by an INPUTCLEAR statement, to ensure that the when the subroutine is finished, the user has a chance to read the results before continuing with the program.
BREAK OFF ECHO OFF GOSUB GO.CALC INPUTCLEAR PRINT "PRESS ANY KEY TO CONTINUE: ": |
See Also