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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,d2c21e8238e985b5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-29 08:20:35 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!news-xfer.siscom.net!not-for-mail Message-ID: <3CF4F1A8.6A491F3@yahoo.com> Date: Wed, 29 May 2002 10:20:08 -0500 From: Anatoly Chernyshev X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) 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=iso-8859-1 Content-Transfer-Encoding: 8bit X-Original-NNTP-Posting-Host: 147.126.101.90 X-Original-Trace: 29 May 2002 09:22:48 -0600, 147.126.101.90 X-COMPLAINTS: Report abuse to abuse@mhogaming.com Organization: Newshosting.com - Highest quality at a great price! www.newshosting.com NNTP-Posting-Host: 40a23b9e.news.newshosting.com X-Trace: DXC=LSJPXnLeMlMXj^c\A[P@ABX`1N4>^k1LCiF6BbIV4YYBmfkIQ\;j:OLFh12YEENCSCm2lengNZCfEVM5VO4n<7XO Well, this post got a surprising response, so I have to make some explanation on that. First, I beg your pardon for probable confusing of the terms. I did not think of modular types as a computer scientist, instead I just thought of some �cyclical� integer type, which will never overflow even being added with an �out of range� number. I found this type should mostly be the modular alike. I see the usefulness of this type is in arrays dimensions � when one goes beyond the array boundary it automatically gets to the opposite side. Arrays with such a property known as �periodic boundary condition� are widely used in molecular mechanics and cellular automata (Conway�s Game of Life, for instance). I had not found those types in packages available to public, so I decided to write my own. Actually, the package for deal with such �extended modular� types merely is a service one aimed for further development of package(s) for periodical boundary condition arrays. Anatoly Chernyshev 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 >