🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.programmer
Article #382

Re: An advanced DOS question (contd ..)

#382
From: Tom Almy
Date: Thu, 03 May 1990 15:39
19 lines
1241 bytes
In article <10151.263f01fa@vax1.cc.lehigh.edu> lubkt@vax1.cc.lehigh.edu writes:
>I do not know why a  program might want to  flush the keyboard buffer.
>There may be a valid  reason  for it. I don't  know. If someone knows,
>then please post  it on the net.

Easy. You flush the input buffer to get rid of any unintentional typeahead.
Imagine a typist quickly typing:
erase *.*			(A typing error, as it turns out)
yyy foo				( runs program yyy)

The erase program prompts "are you sure?", only to immediately snarf the
"y", and erases the directory!

If you use the command interpreter 4DOS then the KEYSTACK function will
do exactly what you want (it can handle buffer flushing).

Tom Almy
toma@tekgvs.labs.tek.com
Standard Disclaimers Apply
Technical Details
Message-ID: <7442@tekgvs.LABS.TEK.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!ogicse!zephyr.ens.tek.com!tekcrl!tekgvs!toma
References: <10151.263f01fa@vax1.cc.lehigh.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!ogicse!zephyr.ens.tek.com!tekcrl!tekgvs!toma
From: toma@tekgvs.LABS.TEK.COM (Tom Almy)
Newsgroups: comp.sys.ibm.pc.programmer
Subject: Re: An advanced DOS question (contd ..)
Message-ID: <7442@tekgvs.LABS.TEK.COM>
Date: 3 May 90 15:39:41 GMT
References: <10151.263f01fa@vax1.cc.lehigh.edu>
Reply-To: toma@tekgvs.LABS.TEK.COM (Tom Almy)
Organization: Tektronix, Inc., Beaverton,  OR.
Lines: 19