comp.lang.ada
 help / color / mirror / Atom feed
From: randhol+abuse@pvv.org (Preben Randhol)
Subject: Re: GNAT bug or expectations problem with Text_Io.Text_Streams
Date: 2000/09/24
Date: 2000-09-24T08:43:39+00:00	[thread overview]
Message-ID: <slrn8srfl4.ek.randhol+abuse@kiuk0156.chembio.ntnu.no> (raw)
In-Reply-To: 8qjmp5$189$1@pyrite.mv.net

On Sat, 23 Sep 2000 21:56:42 -0400, Jeff Creem wrote:
>with Ada.Text_Io;
>with Ada.Text_Io.Text_Streams;
>
>procedure Show_Improper_Stream_Use is
>
>  type My_Byte_Type is mod 2**8;
>  for My_Byte_Type'Size use 8;
>
>  Zero_Byte : My_Byte_Type := 0;
>
>  File : Ada.Text_Io.File_Type;
>
>begin
>  Ada.Text_Io.Create(
>    Name => "test_file1",
>    File => File);
>  Ada.Text_Io.Put_Line(
>    File => File,
>    Item => "Hello");
>
>  for My_Byte in My_Byte_Type'range loop
>    My_Byte_Type'Write(Ada.Text_Io.Text_Streams.Stream(File), Zero_Byte);
>    My_Byte_Type'Write(Ada.Text_Io.Text_Streams.Stream(File), Zero_Byte);
>
>
>    My_Byte_Type'Write(Ada.Text_Io.Text_Streams.Stream(File), My_Byte);
                                                               ^^^^^^^
                                                               Not
                                                               declared?

It is probably I that do not understand streams, but I don't understand
why Gnat didn't complain that there is no My_Byte declared? Can somebody
enlighten me on this, please?

-- 
Preben Randhol - Ph.D student - http://www.pvv.org/~randhol/
"i too once thought that when proved wrong that i lost somehow"
                               - i was hoping, alanis morisette




  parent reply	other threads:[~2000-09-24  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-23  0:00 GNAT bug or expectations problem with Text_Io.Text_Streams Jeff Creem
2000-09-24  0:00 ` David C. Hoos, Sr.
2000-09-24  0:00   ` Preben Randhol
2000-09-24  0:00 ` Preben Randhol
2000-09-24  0:00 ` Preben Randhol [this message]
2000-09-24  0:00   ` Preben Randhol
2000-09-24  0:00   ` David C. Hoos, Sr.
2000-09-24  2:23 ` Ted Dennison
2000-09-24  0:00   ` Jeff Creem
replies disabled

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