From: "Jeff Creem" <jeff@thecreems.com>
Subject: Re: get_line and skip_line in package text_io
Date: Wed, 31 Jan 2001 20:33:24 -0500
Date: 2001-01-31T20:33:24-05:00 [thread overview]
Message-ID: <t7hf2ir99n970e@corp.supernews.com> (raw)
In-Reply-To: 959tlt$mtm$1@slb6.atl.mindspring.net
Never use (ok almost never) skip_line after a get_line. Use skip_line after
reading Integers, floats, enums
using their respective IO packages if you want to ignore the rest of the
contents on the line.
The only time a skip_line after a get_line makes sense is when you really
want to throw away the contents
of a second line or when Last returns = Item'last (indicating that not all
of the text on the line was consumed) and
you want to ignore for some reason the rest of the line.
"arcele" <unhuh@hotmail.com> wrote in message
news:959tlt$mtm$1@slb6.atl.mindspring.net...
> I'm slightly confused about the purpose of the text_io.skip_line function.
> Some times with a get_line command in my program even after the user hits
> enter the program does not continue, i'm sure this is because i am not
using
> skip_line correctly, but what exactly does the skip_line function do? and
> when should i use it? thanks in advance for any help. ryan
>
>
prev parent reply other threads:[~2001-02-01 1:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-31 20:55 get_line and skip_line in package text_io arcele
2001-02-01 1:33 ` Jeff Creem [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox