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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ed023c7889c56295 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-28 03:07:11 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!opentransit.net!wanadoo.fr!teaser.fr!enst!enst.fr!not-for-mail From: "David C. Hoos, Sr." Newsgroups: comp.lang.ada Subject: Re: Ada Compiler Complaint ? Date: Tue, 28 Aug 2001 05:06:20 -0500 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: References: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 998993229 75357 137.194.161.2 (28 Aug 2001 10:07:09 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Tue, 28 Aug 2001 10:07:09 +0000 (UTC) Cc: To: Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.4 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:12505 Date: 2001-08-28T05:06:20-05:00 Since file IO can only be done in whole bytes, what was your intention in instantiating Integer_IO for your Bit type? E.g., ion which bit of each byte would the data bit reside? Incidentally, the type bit would probably be better defined as mod 2 instead of range 0 .. 1. ----- Original Message ----- From: "Dale Pennington" Newsgroups: comp.lang.ada To: Sent: August 27, 2001 10:02 PM Subject: Ada Compiler Complaint ? > Folks, looks like my company news server is acting wierd, so I am also > posting from a home account. If this shows up twice, just ignore the second > one. > > I have a chunk of code giving me an error I do not understand. The code is : > > package X > ... > type Bit is range (0..1); > for Bit'Size use 1; > > type Bit_Array is array(1..20000) of Bit; > pragma Pack(Bit_Array); > > type Bit_Array_Ptr is access Bit_Array; > > package Bit_Io is new Ada.Text_Io.Integer_Io(Bit); > > ... > > procedure Y > ... > A_Bit_Array : Bit_Array_Ptr; > begin > ... > Bit_Io.Put(Outfile,A_Bit_Array(I),1); > ... > end Y; > ... > end package X; > > The compiler complains for the Bit_Io.Put instruction on the column > A_Bit_Array starts : > expected type "System.Unsigned_Types.Packed_Byte" > found type "Bit" defined at xxx. > > Where xxx is the line the type Bit is at. > > Anyone know why the compiler is complaining, and what I can do about it ? > > Thanks > > Dale Pennington > > > > > > > _______________________________________________ > comp.lang.ada mailing list > comp.lang.ada@ada.eu.org > http://ada.eu.org/mailman/listinfo/comp.lang.ada >