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,a1458d1793850de4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-16 16:31:11 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.mathworks.com!wn13feed!wn11feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!rwcrnsc51.ops.asp.att.net.POSTED!not-for-mail Message-ID: <3F8F2A30.5010908@comcast.net> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Interger_io get and Text_io.Get_line References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.34.139.183 X-Complaints-To: abuse@comcast.net X-Trace: rwcrnsc51.ops.asp.att.net 1066347070 24.34.139.183 (Thu, 16 Oct 2003 23:31:10 GMT) NNTP-Posting-Date: Thu, 16 Oct 2003 23:31:10 GMT Organization: Comcast Online Date: Thu, 16 Oct 2003 23:31:10 GMT Xref: archiver1.google.com comp.lang.ada:1026 Date: 2003-10-16T23:31:10+00:00 List-Id: CheGueVerra wrote: > Okay, after playing with it some more, I found that if I do this > > Put_line("Enter a number"); > Entiers.get(Number, 2); > Skip_line; > Put_line("Enter a string"); > Get_Line(TstStr, Last); > Put_line(TstStr(TstStr'First..Last)); > > > then the program runs as I expect it to do, the thing is I don't understand > why I need a Skip_line for it to work, So if anyone can shed some light on > that I would appriciate it The Get for Number reads a number, the Skip_Line reads the End_of_Line following it. I won't go into all the gory details of how to set reads from the console to character at a time from line at a time, etc. Notice that without the fix, entering the number followed on the same line by the string would work. -- Robert I. Eachus "Quality is the Buddha. Quality is scientific reality. Quality is the goal of Art. It remains to work these concepts into a practical, down-to-earth context, and for this there is nothing more practical or down-to-earth than what I have been talking about all along...the repair of an old motorcycle." -- from Zen and the Art of Motorcycle Maintenance by Robert Pirsig