Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!uakari.primate.wisc.edu!dogie.macc.wisc.edu!uwm.edu!marque!carroll1!jeff
From: jeff@carroll1.UUCP (Jeff Bartig)
Newsgroups: comp.lang.pascal
Subject: Re: Clearing the keyboard buffer
Message-ID: <700@carroll1.UUCP>
Date: 3 Oct 89 03:32:24 GMT
References: <1169@krafla.rhi.hi.is>
Reply-To: jeff@carroll1.UUCP (Jeff Bartig)
Organization: Carroll College-Waukesha, WI
Lines: 18

In article <1169@krafla.rhi.hi.is> karlth@rhi.hi.is (Karl Thoroddsen) writes:
>While writing in TURBO 4.0 I've constantly encountered the problem
>of not being able to flush(clear) the keyboard buffer.

try using:

WHILE keypressed DO
  ch:=readkey;

Where ch is a character variable and there is a "USES crt" at the
beginning of your program.

Jeff

-- 
 Jeff Bartig, Carroll College   |     "The sooner you fall
 jeff@carroll1.cc.edu           |   behind, the more time you
 uunet!marque!carroll1!jeff     |       have to catch up."