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,8201deea80f1752a X-Google-Attributes: gid103376,public From: Robert A Duff Subject: Re: 3-bit array ... Date: 1999/12/06 Message-ID: #1/1 X-Deja-AN: 557296763 Sender: bobduff@world.std.com (Robert A Duff) References: <382386fe.85782690@news.uswest.net> <384728ff.588431360@news.uswest.net> <3847EF64.EBD41169@callnetuk.com> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1999-12-06T00:00:00+00:00 List-Id: Nick Roberts writes: > Just out of curiosity ... what is a 3-bit array? People are using that to refer to a packed array of 3-bit components. For example: type T1 is range 1..5; type T2 is array(Integer range <>) of T1; pragma Pack(T2); In Ada 95, T1'Size = 3 -- a statement that will no doubt elicit the usual complaints from Robert Dewar about loose-cannon language design teams run amok. ;-) ;-) Also in Ada 95, T2'Component_Size will be either 3 or 4, depending on the whim of the compiler writer, which doesn't seem like a good language design decision. I'm assuming a 32-bit machine, here. GNAT has always supported packing to the 3-bit level. AverStar's front end, and the Green Hills compiler that uses AverStar's FE, used to use 4, but now uses 3, due to customer demand for it. That's what this whole discussion has been about. There's also the issue of whether you can say: for T2'Component_Size use 3; instead of the pragma Pack above. - Bob