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 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 10:09:35 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!207.217.77.102!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3DC0204E.4050203@acm.org> From: Jeffrey Carter User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.0) Gecko/20020530 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Get_Line References: <3DBF3659.30709@acm.org> <4dRv9.46453$wm6.7691@nwrddc01.gnilink.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 30 Oct 2002 18:08:43 GMT NNTP-Posting-Host: 63.184.104.195 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 1036001323 63.184.104.195 (Wed, 30 Oct 2002 10:08:43 PST) NNTP-Posting-Date: Wed, 30 Oct 2002 10:08:43 PST Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:30236 Date: 2002-10-30T18:08:43+00:00 List-Id: 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