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,d2c21e8238e985b5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-24 04:55:35 PST Path: archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!supernews.com!easynews!news-xfer2.newshosting.com!news-out.nuthinbutnews.com!propagator-sterling!news-in.nuthinbutnews.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed-east.nntpserver.com!nntpserver.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!78d6f1f0!not-for-mail Message-ID: <3CEE268A.237998EF@earthlink.net> From: "Marc A. Criley" Organization: Quadrus Corporation X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Extended modal types References: <3CEDFF90.B94D7E32@yahoo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 24 May 2002 11:38:08 GMT NNTP-Posting-Host: 63.190.229.132 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 1022240288 63.190.229.132 (Fri, 24 May 2002 04:38:08 PDT) NNTP-Posting-Date: Fri, 24 May 2002 04:38:08 PDT Xref: archiver1.google.com comp.lang.ada:24637 Date: 2002-05-24T11:38:08+00:00 List-Id: Anatoly Chernyshev wrote: > > Once I have been introduced in Ada programming, I was very > exciting about modular types. Later on it became evident to me that > these types are rather limited, and one cannot use arbitrary modular > range, > for example, like -100..345. I didn't find any packages in the WWW that > can > deal with such "extended" modular variables, so I wrote my own. > Anyone interested could pick it up at > http://www.polarhome.com/~ada/ch_rings.zip Hmmm, modular types are unsigned by design. So a "modular range" having a negative lower bound doesn't really make any sense; it's no longer a modular type. Though one can produce a package that provides operations on an integer type that mimics some of the modular type behavior. Marc A. Criley Consultant Quadrus Corporation www.quadruscorp.com