comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
Subject: Possible gnat and ObjectAda bugs?
Date: 2000/11/25
Date: 2000-11-25T00:00:00+00:00	[thread overview]
Message-ID: <9VPT5.39609$A2.8013565@newsrump.sjc.telocity.net> (raw)

The code at the end of this message produces strange results with GNAT
3.13p,
and even more bizarre results with ObjectAda 7.1:

What is strange is that when Standard Input is from the keyboard, the
program
does not enter the loop until the enter key has been pressed.

Is this a bug, or am I missing something here?

with Ada.Text_IO;
procedure Echo
is
   C : Character;
begin
   while not Ada.Text_IO.End_Of_File (Ada.Text_IO.Current_Input)
   loop
      Ada.Text_IO.Put_Line
        (Ada.Text_IO.Standard_Error,
         "Waiting for character...");
      Ada.Text_IO.Get_Immediate (C);
      Ada.Text_IO.Put_Line
        (Ada.Text_IO.Standard_Error,
         "Got character at position" &
         Integer'Image (Character'Pos (C)));
      Ada.Text_IO.Put (Ada.Text_IO.Current_Output, C);
   end loop;
end Echo;







             reply	other threads:[~2000-11-25  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-25  0:00 David C. Hoos, Sr. [this message]
2000-11-26  0:00 ` Possible gnat and ObjectAda bugs? Preben Randhol
2000-11-27  0:00 ` Randy Brukardt
replies disabled

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