comp.lang.ada
 help / color / mirror / Atom feed
From: mheaney@ni.net (Matthew Heaney)
Subject: Re: Boolean array representation question
Date: 1997/11/20
Date: 1997-11-20T00:00:00+00:00	[thread overview]
Message-ID: <mheaney-ya023680002011972302430001@news.ni.net> (raw)
In-Reply-To: 880041511.80snx@jvdsys.nextjk.stuyts.nl


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
<mailto:matthew_heaney@acm.org>
(818) 985-1271




  reply	other threads:[~1997-11-20  0:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-11-20  0:00 Boolean array representation question Jerry van Dijk
1997-11-20  0:00 ` Matthew Heaney [this message]
1997-11-21  0:00 ` John P. Lippiello
1997-11-22  0:00   ` Jerry van Dijk
1997-11-22  0:00     ` Robert Dewar
1997-11-22  0:00     ` Matthew Heaney
1997-11-22  0:00       ` Robert Dewar
1997-11-23  0:00       ` Geert Bosch
1997-11-24  0:00         ` Larry Kilgallen
1997-11-24  0:00           ` Robert Dewar
replies disabled

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