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,eb420f872d7f3049 X-Google-Attributes: gid103376,public From: mheaney@ni.net (Matthew Heaney) Subject: Re: Boolean array representation question Date: 1997/11/20 Message-ID: #1/1 X-Deja-AN: 291164998 Distribution: world References: <880041511.80snx@jvdsys.nextjk.stuyts.nl> Organization: Estormza Software Newsgroups: comp.lang.ada Date: 1997-11-20T00:00:00+00:00 List-Id: In article <880041511.80snx@jvdsys.nextjk.stuyts.nl>, jerry@jvdsys.nextjk.stuyts.nl (Jerry van Dijk) wrote: >When compiling the following program: > > with Ada.Text_IO; use Ada.Text_IO; > > procedure Test_1 is > type Bit_Array is array (Natural range <>) of Boolean; > My_Array : Bit_Array (0 .. 4) := (others => False); > begin > Put_Line ("The size of Bit_Array is" & > Integer'Image (My_Array'Size)); > end Test_1; > >both GNAT and OA on NT report the size as 40 so I wonder if >this is some kind of magic number and where it is coming from. The component size of Bit_Array is 8 bits, and there are 5 components in the array object. That makes 5 x 8 = 40 bits. -------------------------------------------------------------------- Matthew Heaney Software Development Consultant (818) 985-1271