home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / TECLADO / CLEARKEY.ZIP / CLEARKEY.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1990-01-21  |  1.0 KB  |  26 lines

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