home *** CD-ROM | disk | FTP | other *** search
- Program CLEARKEY;
-
- { Written in Borland's Turbo Pascal, version 5.0.
- Ever gotten ahead of yourself in .bat jobs by pressing the keys
- you "knew" you needed but then found out they were the wrong
- ones and screwed things up royally? This program helps you.
- It clears the keyboard buffer.
- For you FoxBase people, it's the same as the
- "clear typeahead" command.
- I found I needed it most when using the "Query" program which
- let's you get a y, n, or <esc> answer in batch jobs. I use
- Query extensively but have the bad habit of improperly exitting
- programs just before the query command executes, and as a result,
- query gets keystrokes which were intended for the previously
- executing program. As my brain surgeon said, "Oops."
- Copywrong 01/90, McGlumphy, 37415. (Copywrong means use it
- any way you want; just don't bug me about it.) }
- Uses Crt;
- Var Akey : Char;
- Begin { Main }
- while keypressed do
- begin
- Akey := Readkey;
- end;
- End. { Boy! That was some heavy-duty code, huh! }