The cleartypeahead statement clears any typed ahead characters that have been pressed while a procedure is running.
Parameters
No parameters.
Description
Panorama normally ignores any keys that are pressed while a procedure is running (so that the keys don’t interfere with the operation of the code as it runs). However, the ignored keys are saved for processing after the code has finished running. This allows the user to “type ahead” and not worry about keys being lost while code is running. (If it turns out that the keys aren’t wanted after all, usually the user can simply use the Undo command.
In some situations you may not want to allow the user to type ahead, instead you want keyboard entry to start “fresh” when the program finishes running. This is where the cleartypeahead statement comes in. Running this statement tells Panorama to forget any keys that have been pressed while the code was running and are being held for later input.
If you do use the cleartypeahead statement, it should probably be the final statement in your code. If it’s not the final statement, additional keys could be queued up as the program continues to run. There’s no problem running this statement more than once, however. If there aren’t any saved keys, the statement simply does nothing.
When code is temporarily suspended with the pause statement, Panorama will normally process any keys that were pressed while the code was running, just as it does when the code is completely finished. If you don’t want this to happen, put a cleartypeahead statement immediately before the pause statement, like this:
clearetypeahead
pause ""
See Also
History
Version | Status | Notes |
10.2 | New | New in this version. |