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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7dac35d19d7d0d84 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-14 07:41:46 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!uunet!ash.uu.net!dca.uu.net!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Getting modular type size in bits Date: 14 Mar 2003 10:41:44 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1047656504 22244 199.172.62.241 (14 Mar 2003 15:41:44 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 14 Mar 2003 15:41:44 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:35322 Date: 2003-03-14T10:41:44-05:00 List-Id: Jano <402450@cepsz.unizar.es> writes: > type Number is Mod 2**32; > > I want to know that the type size is 5. I'm aware of the 'modulus > attribute, and 'size. If I understand correctly, 'size returns the size > allocated by the compiler for the type (normally 8 in this case), not > the _minimum_ size to allocate it (which is what I would need in that > case). 'Size returns the minimum -- i.e. how big it would be if it were a component of a packed record. That's 32 in this case. If it were "mod 2**5", then Number'Size would be 5, not 8. - Bob