* get_line and skip_line in package text_io
@ 2001-01-31 20:55 arcele
2001-02-01 1:33 ` Jeff Creem
0 siblings, 1 reply; 2+ messages in thread
From: arcele @ 2001-01-31 20:55 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: get_line and skip_line in package text_io
2001-01-31 20:55 get_line and skip_line in package text_io arcele
@ 2001-02-01 1:33 ` Jeff Creem
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Creem @ 2001-02-01 1:33 UTC (permalink / raw)
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
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-02-01 1:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-31 20:55 get_line and skip_line in package text_io arcele
2001-02-01 1:33 ` Jeff Creem
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox