comp.lang.ada
 help / color / mirror / Atom feed
From: nobody@REPLAY.COM (Anonymous)
Subject: Re: Assistance with text i/o
Date: 1998/04/14
Date: 1998-04-14T00:00:00+00:00	[thread overview]
Message-ID: <199804141400.QAA28647@basement.replay.com> (raw)
In-Reply-To: 35193b3d.1154213@SantaClara01.news.InterNex.Net


<6f8sqn$tuu$1@Urvile.MSUS.EDU>

On Mon, 13 Apr 1998 16:21:17 GMT, tmoran@bix.com (Tom Moran) wrote:

> Ada.Text_IO.Get_Line will read the entire line into a String, then
> parse (perhaps using the Ada 95 Strings packages) the line into two
> strings, one for each "word".
> 

This is incorrect. It is a common misconception that
Ada.Text_Io.Get_Line "will read [an] entire line". Actually, Get_Line
reads characters into successive positions in Item (: out String) until
either

Item is filled with characters

or

Get_Line encounters a line terminator, in which case it skips the line
terminator.

If Get_Line fills Item before it encounters a line terminator, it does
not read an entire line, nor does it skip a line terminator. Do not rely
on Ada.Text_Io.Get_Line to read an entire line.

Jeff Carter  PGP:1024/440FBE21
My real e-mail address: ( carter @ innocon . com )
"Go and boil your bottom."
Monty Python & the Holy Grail

Posted with Spam Hater - see
http://www.compulink.co.uk/~net-services/spam/




           reply	other threads:[~1998-04-14  0:00 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <35193b3d.1154213@SantaClara01.news.InterNex.Net>]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox