From: Jeffrey Carter <jrcarter@acm.org>
Subject: Re: Get_Line
Date: Wed, 30 Oct 2002 18:08:43 GMT
Date: 2002-10-30T18:08:43+00:00 [thread overview]
Message-ID: <3DC0204E.4050203@acm.org> (raw)
In-Reply-To: 4dRv9.46453$wm6.7691@nwrddc01.gnilink.net
I'm afraid I still don't have enough information to give a meaningful
answer. When and under what conditions do you exit the loop? Is the
problem observed within a single call to Getdata, or from one call to
the next? If the latter, we need to see all the code that is executed
between the calls, since that may affect the state of the environment.
Justin Birtwell wrote:
> --I just added this code to see if calling Skip_Line would fix the
> problem, but alas, to no effect.
> if(Buffer'First>Last) then
> Ada.Text_Io.Skip_Line;
> end if;
This calls Skip_Line if you have read an empty line. But Get_Line will
skip the line terminator if you read an empty line (or any line with <
Buffer'Length characters). What you want to do is call Skip_Line if
Get_Line has not skipped the line terminator, which happens if the input
is >= Buffer'Length characters:
if Last >= Buffer'Last then
Ada.Text_Io.Skip_Line;
end if;
--
Jeff Carter
"All citizens will be required to change their underwear
every half hour. Underwear will be worn on the outside,
so we can check."
Bananas
next prev parent reply other threads:[~2002-10-30 18:08 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-29 20:24 Get_Line Justin Birtwell
2002-10-29 20:55 ` Get_Line David C. Hoos
2002-10-30 1:30 ` Get_Line Jeffrey Carter
2002-10-30 13:33 ` Get_Line Justin Birtwell
2002-10-30 14:40 ` Get_Line Preben Randhol
2002-10-30 17:09 ` Get_Line Jean-Pierre Rosen
2002-10-30 18:08 ` Jeffrey Carter [this message]
2002-10-30 22:42 ` Get_Line Robert A Duff
2002-10-31 0:26 ` Get_Line Chad R. Meiners
2002-10-31 0:44 ` Get_Line Robert A Duff
2002-10-31 10:32 ` Get_Line John English
2002-10-31 11:30 ` Get_Line Preben Randhol
2002-10-31 13:10 ` Get_Line John English
2002-10-31 17:39 ` Get_Line Warren W. Gay VE3WWG
2002-10-31 21:46 ` Get_Line Chad R. Meiners
2002-11-01 16:59 ` Get_Line Robert A Duff
2002-11-01 21:04 ` Get_Line Chad R. Meiners
2002-11-01 23:32 ` Get_Line Matthew Heaney
2002-11-02 0:28 ` Get_Line Chad R. Meiners
2002-10-31 8:53 ` Get_Line Preben Randhol
2002-10-31 18:04 ` Get_Line Jeffrey Carter
2002-11-01 11:18 ` Get_Line Preben Randhol
2002-10-30 14:44 ` Get_Line Preben Randhol
2002-10-31 21:55 ` Get_Line Matthew Heaney
-- strict thread matches above, loose matches on Subject: below --
1999-07-02 0:00 GET LINE babefan
1999-07-02 0:00 ` czgrr
1998-06-05 0:00 get_line Steve Dyrdahl
1998-06-05 0:00 ` get_line Samuel Mize
1998-06-17 0:00 ` get_line Hans Marqvardsen
1998-06-18 0:00 ` get_line John McCabe
1998-06-21 0:00 ` get_line Robert Dewar
1998-06-06 0:00 ` get_line Dale Stanbrough
1998-06-06 0:00 ` get_line Robert Dewar
1998-06-06 0:00 ` get_line Matthew Heaney
1998-06-07 0:00 ` get_line Dale Stanbrough
1998-06-06 0:00 ` get_line Matthew Heaney
1998-06-18 0:00 ` get_line Robert I. Eachus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox