🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #341

Summary: How to flush keyboard buffer

#341
From: Mark Scase
Date: Mon, 10 Aug 1992 09:44
18 lines
850 bytes
Many thanks to all the people who replied to my recent question I
posted in comp.os.msdos.programmer asking how to flush the keyboard
buffer in Borland C under DOS.

I received 3 different ways of flushing the keyboard buffer which
worked.  They are:

while (kbhit()) getch();

while (bioskey(1)) bioskey(0);

while (bioskey(1)) if (!getch()) getch();

Perhaps this could be included in the c.o.m.p faq list as I'm sure
it is something people want to do every so often.

Mark Scase  coa44@keele.ac.uk
Technical Details
Message-ID: <3748@keele.keele.ac.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!keele!coa44

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!keele!coa44
From: coa44@seq1.keele.ac.uk (Mark Scase)
Newsgroups: comp.os.msdos.programmer
Subject: Summary: How to flush keyboard buffer
Keywords: Keyboard buffer, DOS
Message-ID: <3748@keele.keele.ac.uk>
Date: 10 Aug 92 09:44:26 GMT
Organization: University of Keele, England
Lines: 18