Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!uunet!mcsun!sunic!draken!d88-eli From: d88-eli@nada.kth.se (Erik Liljencrantz) Newsgroups: comp.lang.pascal Subject: Re: Clearing the keyboard buffer Message-ID: <1846@draken.nada.kth.se> Date: 3 Oct 89 06:11:45 GMT References: <1169@krafla.rhi.hi.is> Reply-To: d88-eli@nada.kth.se (Erik Liljencrantz) Organization: Royal Institute of Technology, Stockholm, Sweden Lines: 13 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. One simple way using the CRT unit: WHILE KeyPressed DO Ch:=ReadKey; { Ch is CHAR } Do not use ReadLn as this waits for a return to terminate the input. -- Erik Liljencrantz | "No silly quotes!!" d88-eli@nada.kth.se | Embraquel D. Tuta