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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8309f2bc055237c4 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Bit manipulation Date: 2000/11/13 Message-ID: <8uoqi1$oqi$1@nnrp1.deja.com>#1/1 X-Deja-AN: 693054942 References: <8u8v6n$b7o$1@nnrp1.deja.com> <2WTH$pdrCfOd@eisner.decus.org> <8ub6kt$6nd$1@nnrp1.deja.com> <8ubeq8$cgm$1@nnrp1.deja.com> <3A0D38E9.BB87D8CD@mindspring.com> X-Http-Proxy: 1.0 x64.deja.com:80 (Squid/1.1.22) for client 205.232.38.240 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Mon Nov 13 13:32:49 2000 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; I) Date: 2000-11-13T00:00:00+00:00 List-Id: In article , lutz@iks-jena.de (Lutz Donnerhacke) wrote: > pragma Pack(bitfield); -- the following clause will not work > -- without pragma > for bitfield'Size use wordsize; As most certainly you would expect, see RM 13.3: 53 A Size clause on a composite subtype should not affect the internal layout of components. followed by some gruesome code for doing a rotate, to which one must ask, why on earth not use the Rotate functions provided as primitives in Ada 95 (these can be located by looking up the keyword rotate in the index!) Yes, I suppose GNAT (or in general any Ada 95 compiler) could try to optimize this gruesome code, but since no one would ever write it anyway, why bother? Sent via Deja.com http://www.deja.com/ Before you buy.