From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d2bc1c4ca7f04be6 X-Google-Attributes: gid103376,public From: randhol+abuse@pvv.org (Preben Randhol) Subject: Re: GNAT bug or expectations problem with Text_Io.Text_Streams Date: 2000/09/24 Message-ID: #1/1 X-Deja-AN: 673446146 References: <8qjmp5$189$1@pyrite.mv.net> X-Complaints-To: usenet@itea.ntnu.no X-Trace: kopp.stud.ntnu.no 969785019 9032 129.241.83.82 (24 Sep 2000 08:43:39 GMT) Organization: Norwegian university of science and technology User-Agent: slrn/0.9.6.2 (Linux) NNTP-Posting-Date: 24 Sep 2000 08:43:39 GMT Newsgroups: comp.lang.ada Date: 2000-09-24T08:43:39+00:00 List-Id: 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