comp.lang.ada
 help / color / mirror / Atom feed
* Possible gnat and ObjectAda bugs?
@ 2000-11-25  0:00 David C. Hoos, Sr.
  2000-11-26  0:00 ` Preben Randhol
  2000-11-27  0:00 ` Randy Brukardt
  0 siblings, 2 replies; 3+ messages in thread
From: David C. Hoos, Sr. @ 2000-11-25  0:00 UTC (permalink / 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;







^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-11-27  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-25  0:00 Possible gnat and ObjectAda bugs? David C. Hoos, Sr.
2000-11-26  0:00 ` Preben Randhol
2000-11-27  0:00 ` Randy Brukardt

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