From: "Justin Birtwell" <jbirtwell@yahoo.com>
Subject: Re: Get_Line
Date: Wed, 30 Oct 2002 13:33:52 GMT
Date: 2002-10-30T13:33:52+00:00 [thread overview]
Message-ID: <4dRv9.46453$wm6.7691@nwrddc01.gnilink.net> (raw)
In-Reply-To: 3DBF3659.30709@acm.org
Jeffery,
Thank you for your detailed response. First I apologize for not including
the call to Get_Line() in my original post. I'd like to make reparations by
providing the correct code at the tail of this post.
I'm running this code on my laptop (WinXP), but I don't want to write
non-portable code, meaning code that will only run on the Win32 platform. I
believe that your assessment about the line terminator behavior with
Get_Line is the cause of the problem. I tried calling Skip_Line immediately
after the call but with seeming no affect. I'm going to try to find the
packages you have referred to.
Once again, thank you. I was not aware of this phenomenon and I know it
would have taken me much effort to discover it in the RM. If you can think
of any other approach to the problem I welcome your response.
sincerely,
Justin
P.S. Here's my original code.
procedure Getdata(P_Num_Of_Points: out Natural) is
Last:Natural:=0;
Buffer:String(1..80):=(1..80=>Character'val(0));
l_Num:Integer;
--Answer:Character;
begin
--get input
--are there any invalid characters
--is it a valid number anyway?
--does the user want to use this number?
Ada.Text_Io.Put_Line("Enter between 1 and 6 Balloons to create in
the box. ");
loop
begin
Ada.Text_IO.New_Line;
Ada.Text_Io.Get_Line(Buffer,Last); --Here's the cause of the
problem.
--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;
next prev parent reply other threads:[~2002-10-30 13:33 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 ` Justin Birtwell [this message]
2002-10-30 14:40 ` Get_Line Preben Randhol
2002-10-30 17:09 ` Get_Line Jean-Pierre Rosen
2002-10-30 18:08 ` Get_Line Jeffrey Carter
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