Clear typeahead buffer in DOS
Posted: 26 Mar 2012 09:10
Hi all,
I was wondering if this is possible to achieve in DOS.
ZX Spectrum code:
OpenVMS DCL code:
I was doing some repeating tasks. After a specific tasks completed I used a
set/p to wait for ENTER key to be pressed because I had to do something else and the process *must* wait.
So, I accidently pressed the ENTER key twice.
I would like to avoid this. Is there a way to clear a typeahead buffer? So that the key presses are not remembered? If I press the ENTER key twice (or 3+ times) it will not remember this.
Thanks,
Saso
I was wondering if this is possible to achieve in DOS.
ZX Spectrum code:
Code: Select all
10 IF INKEY$ <>"" THEN GO TO 10
20 IF INKEY$ ="" THEN GO TO 20
OpenVMS DCL code:
Code: Select all
$ set term/notypeahead
I was doing some repeating tasks. After a specific tasks completed I used a
set/p to wait for ENTER key to be pressed because I had to do something else and the process *must* wait.
So, I accidently pressed the ENTER key twice.
I would like to avoid this. Is there a way to clear a typeahead buffer? So that the key presses are not remembered? If I press the ENTER key twice (or 3+ times) it will not remember this.
Thanks,
Saso