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-Thread: 103376,6339fea48a1b8cda X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!x1g2000prh.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Enumeration representation clause surprise. Date: Mon, 16 Jun 2008 07:50:19 -0700 (PDT) Organization: http://groups.google.com Message-ID: <62644043-4704-4d49-b26b-5ba789f007a5@x1g2000prh.googlegroups.com> References: <770ae1af-b9fd-4c8a-915c-a5cb3ea8fc81@c65g2000hsa.googlegroups.com> <87hcbybazk.fsf@willow.rfc1149.net> <4f5f512a-36e6-466e-a5a9-5f26857841f8@w4g2000prd.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1213627819 23795 127.0.0.1 (16 Jun 2008 14:50:19 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 16 Jun 2008 14:50:19 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: x1g2000prh.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:725 Date: 2008-06-16T07:50:19-07:00 List-Id: On Jun 15, 12:33 pm, Robert A Duff wrote: > Adam Beneschan writes: > >...I suppose you could > > arbitrarily decide it's zero (which would make some sense > > mathematically) > > Yes, I think so. > > >... but it seems more commonsensical to say that nothing > > is stored there because there ain't no bits to store anything in. > > But that view requires a special case. > > The natural unsigned range for n bits, where n >= 0, > is 0..(2**n)-1. Which is 0..0 when n = 0. Right, that does make sense. I'm not convinced it matters, since all this mathematics isn't necessariliy going to be self-evident to a poor user. This particular subthread was about a warning message that, I think, could leave the user scratching their head about what it means, and that isn't a good thing regardless of how sound is the mathematics on which the warning is based. -- Adam