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-Thread: 103376,d54559bde05f5bb8 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!d23g2000yqc.googlegroups.com!not-for-mail From: christoph.grein@eurocopter.com Newsgroups: comp.lang.ada Subject: Re: Weird string I/O problem Date: Mon, 1 Dec 2008 23:53:58 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <6d9d4120-3af9-42c6-b3e9-768418948084@t3g2000yqa.googlegroups.com> NNTP-Posting-Host: 80.156.44.178 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1228204439 10817 127.0.0.1 (2 Dec 2008 07:53:59 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 2 Dec 2008 07:53:59 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d23g2000yqc.googlegroups.com; posting-host=80.156.44.178; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.0.04506.30),gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 webwasher (Webwasher 6.8.2.3963) Xref: g2news2.google.com comp.lang.ada:3823 Date: 2008-12-01T23:53:58-08:00 List-Id: On 2 Dez., 07:55, a...@anon.org (anon) wrote: > Have you ever learn, you do not give the complete code, because too many > students like to steal code for there grade. > > So, you ONLY give enough code for the person to use the code to > build his own. And that's what i did! anon pretending educational intentions presents wrong code. What a nice fellow! for index in input_string'Range loop ... Here get the next char from the input stream. ... Be careful, there might be control characters. ... See Ada.Text_IO for appropriate subprograms. exit when char = CR or char = LF ; -- not all OSes treat end of lines like this this is why there are End_of_Line queries input_string ( index ) := char ; Last := Index ; end loop; This would be the way, I guess. To quote from Porgy and Bess: anon is a sometime thing.