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.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM,XPRIO, XPRIO_SHORT_SUBJ autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cbb87dd49168c396,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-29 12:24:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out.nuthinbutnews.com!propagator2-sterling!news-in-sterling.newsfeed.com!news-in.nuthinbutnews.com!cyclone1.gnilink.net!spamfinder.gnilink.net!nwrddc02.gnilink.net.POSTED!53ab2750!not-for-mail From: "Justin Birtwell" Newsgroups: comp.lang.ada Subject: 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: Date: Tue, 29 Oct 2002 20:24:01 GMT NNTP-Posting-Host: 151.202.61.85 X-Complaints-To: abuse@verizon.net X-Trace: nwrddc02.gnilink.net 1035923041 151.202.61.85 (Tue, 29 Oct 2002 15:24:01 EST) NNTP-Posting-Date: Tue, 29 Oct 2002 15:24:01 EST Xref: archiver1.google.com comp.lang.ada:30202 Date: 2002-10-29T20:24:01+00:00 List-Id: Hi, I'm having some strange behavior with Get_Line. In a procedure called GetData I call Get_Line to receive input from the command line. The first time this function is called it behaves fine prompting the user for input. The second time it runs the execution passes through Get_Line and no prompt appears on the command line. Upon doing a little research in the Ref Man. I found a statement that talks about if Get_Line finds a line terminator it automatically returns. But how can this be? Here's the statement from the RM. << A string read by Get or written by Put can extend over several lines. An implementation is allowed to assume that certain external files do not contain page terminators, in which case Get_Line and Skip_Line can return as soon as a line terminator is read. >> But I'm not reading from a file? I'm reading from the command line? Does anyone understand this behavior? Sincerely, Justin P.s. Here's a few statements leading up to the problem... 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 ---This line gets skipped returning with an empty buffer!!!!!!! if Jb.Stringfunctions.Is_Integer(Buffer(Buffer'First..Last)) then