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,c7d533acec91ae16 X-Google-Attributes: gid103376,public From: Mark A Biggar Subject: Re: Question for the folks who designed Ada95 Date: 1999/04/29 Message-ID: <3728D03D.8223B6FC@lmco.com>#1/1 X-Deja-AN: 472482895 Content-Transfer-Encoding: 7bit References: <7g2qu4$ca4$1@usenet.rational.com> <7g6upj$v5c$1@nnrp1.dejanews.com> <3727EC39.E460C803@rocketmail.com> <7g9r16$gll$1@nnrp1.dejanews.com> <925410775.940.21@news.remarQ.com> Content-Type: text/plain; charset=us-ascii Organization: Lockheed Martin Western Development Labs Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-04-29T00:00:00+00:00 List-Id: Fraser Wilson wrote: > > paene lacrimavi postquam Robert Dewar scripsit: > > >Now, *without* going to the Ada RM, let's see if we can > >remember exactly what's going on with the etc here. Hands > >up those who remember how NOT works on non-binary modular > >types (hint: the above quote is wrong wrt NOT :-) > > not X = Y: X + Y = 0 ? That works. The RM defines it as (Modulus - X) which is the same value. > Here's a question: has anyone ever used a modular type which was not > a power of 2, and lived to tell the tale? What was the context? Yeah, two different things: 1) the index into a circular queue defined as: type Queue_index is mod Queue_size; type Queue is array (Queue_index) of Element; (Actual implementation was a generic package) 2) Index type for a hash table where table size was largest prime < 32676. This made the hash function very simple. Sorry, I can't give detailed code examples as both cases involved code for classified government projects. -- Mark Biggar mark.a.biggar@lmco.com