comp.lang.ada
 help / color / mirror / Atom feed
From: christoph.grein@eurocopter.com
Subject: Re: Weird string I/O problem
Date: Mon, 1 Dec 2008 23:53:58 -0800 (PST)
Date: 2008-12-01T23:53:58-08:00	[thread overview]
Message-ID: <af997441-7fb0-41bf-80ad-208a95c4bf30@d23g2000yqc.googlegroups.com> (raw)
In-Reply-To: xZ4Zk.51078$_Y1.36778@bgtnsc05-news.ops.worldnet.att.net

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.



  reply	other threads:[~2008-12-02  7:53 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-26  5:52 Weird string I/O problem Jerry
2008-11-26  7:24 ` christoph.grein
2008-11-26  7:38   ` christoph.grein
2008-11-26  8:25     ` Dmitry A. Kazakov
2008-11-26  9:07   ` Jean-Pierre Rosen
2008-11-26 15:21     ` John McCormick
2008-11-26 15:56     ` Adam Beneschan
2008-11-27 10:13       ` Jean-Pierre Rosen
2008-12-01 16:17         ` Adam Beneschan
2008-11-27  4:46 ` Jerry
2008-11-27 10:27   ` Jean-Pierre Rosen
2008-12-01 19:47 ` anon
2008-12-02  5:44   ` christoph.grein
2008-12-02  6:55     ` anon
2008-12-02  7:53       ` christoph.grein [this message]
2008-12-02 16:39         ` Adam Beneschan
2008-12-03  9:16           ` anon
2008-12-03 10:42             ` christoph.grein
2008-12-03 12:21               ` John B. Matthews
2008-12-04  0:15               ` anon
2008-12-04  7:31                 ` christoph.grein
2008-12-04  7:56                   ` Ludovic Brenta
2008-12-04  8:46                     ` Georg Bauhaus
2008-12-03 11:35             ` stefan-lucks
2008-12-04  0:27               ` anon
2008-12-04  8:58                 ` stefan-lucks
2008-12-04 22:54                   ` anon
2008-12-05  9:06                     ` Georg Bauhaus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox