From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cbb87dd49168c396 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-30 05:33:53 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!199.45.45.8!cyclone1.gnilink.net!spamfinder.gnilink.net!nwrddc01.gnilink.net.POSTED!53ab2750!not-for-mail From: "Justin Birtwell" Newsgroups: comp.lang.ada References: <3DBF3659.30709@acm.org> Subject: Re: Get_Line X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: <4dRv9.46453$wm6.7691@nwrddc01.gnilink.net> Date: Wed, 30 Oct 2002 13:33:52 GMT NNTP-Posting-Host: 151.202.61.85 X-Complaints-To: abuse@verizon.net X-Trace: nwrddc01.gnilink.net 1035984832 151.202.61.85 (Wed, 30 Oct 2002 08:33:52 EST) NNTP-Posting-Date: Wed, 30 Oct 2002 08:33:52 EST Xref: archiver1.google.com comp.lang.ada:30227 Date: 2002-10-30T13:33:52+00:00 List-Id: 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;