Re: Help needed please

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Thu, 20 Jul 2000 08:48:12 -0400, Mike Sabal <MikeS at NOTATIONS.COM> wrote:

>Colin's answer was pretty good, but if you're just trying to get rid of
extra CRLF's, etc., perhaps this line could work:
>
>while getc(0)!=-1 do end while
>
>As long as getc() returns a character, the buffer isn't flushed.  When it
returns -1, that's the end of it all.
>
>HTH,
>Michael J. Sabal

Sorry for the delay in reply, and thanks to Colin and Mike for the response.
I lazily opted for Mike's simpler solution (sorry Colin), but found that the
line needed to be changed to
while get_key() !=-1, presumably getc doesn't return an end of file marker
for the kbd.
Anyway, all sorted now, thanks again

Sid

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu