comp.lang.ada
 help / color / mirror / Atom feed
From: Hyman Rosen <hyrosen@mail.com>
Subject: Re: C getchar() functionality in Ada
Date: Tue, 17 Feb 2009 15:24:32 -0500
Date: 2009-02-17T15:24:32-05:00	[thread overview]
Message-ID: <u2Fml.12022$lk5.10791@newsfe13.iad> (raw)
In-Reply-To: <499b1430$0$90267$14726298@news.sunsite.dk>

Thomas Locke wrote:
> But I understand what you're saying: No end of line characters in Ada!
> Except perhaps when using Get_Immediate and Look_Ahead?

The Ada design has the same error here as Pascal did.
End of Line and End of File are like a craps table;
you can know whether the table *was* hot or cold, but
you cannot know whether the table *will be* hot or
cold. Similarly, you cannot know whether you are at
end of line or end of file until you have tried reading
a character. Ada pretends otherwise, but behind the
scenes it's doing a secret character read-ahead, which
is what causes the odd behavior.

I speak about the various modern OSes. Presumably, once
upon a time input was such that this paradigm made sense,
just like Fortran had special output formatting characters
to rotate the roll of paper.



  reply	other threads:[~2009-02-17 20:24 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-16 20:36 C getchar() functionality in Ada Thomas Locke
2009-02-16 21:43 ` Jeffrey R. Carter
2009-02-17  7:23   ` Thomas Locke
2009-02-17  8:16     ` Niklas Holsti
2009-02-17 13:01       ` Georg Bauhaus
2009-02-17 22:03         ` Thomas Locke
2009-03-03  8:57         ` David Thompson
2009-02-17 20:48     ` Jeffrey R. Carter
2009-02-17 21:59       ` Thomas Locke
2009-02-16 23:46 ` Adam Beneschan
2009-02-17  7:19   ` Thomas Locke
2009-02-17  8:37     ` Jacob Sparre Andersen
2009-02-17 17:31       ` Keith Thompson
2009-02-17 14:57     ` Hibou57 (Yannick Duchêne)
2009-02-17 14:55   ` Hibou57 (Yannick Duchêne)
2009-02-17 10:37 ` m.collado
2009-02-17 22:07   ` Thomas Locke
2009-02-17 16:40 ` Jean-Pierre Rosen
2009-02-17 19:46   ` Thomas Locke
2009-02-17 20:24     ` Hyman Rosen [this message]
2009-02-17 23:44       ` Robert A Duff
2009-02-18  5:44         ` anon
2009-02-18  0:39       ` Adam Beneschan
2009-02-18  7:43     ` Jean-Pierre Rosen
2009-02-18 11:42       ` christoph.grein
2009-02-17 20:38   ` Jeffrey R. Carter
2009-02-18  7:46     ` Jean-Pierre Rosen
2009-02-18 10:41       ` christoph.grein
replies disabled

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