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=2.1 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY,PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,8077d2e20cde67b1 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Modular types inside records Date: 2000/10/21 Message-ID: <8ss7fb$5c7$1@nnrp1.deja.com>#1/1 X-Deja-AN: 684136760 References: <8FD47616EPablo@213.25.200.9> X-Http-Proxy: 1.0 x64.deja.com:80 (Squid/1.1.22) for client 205.232.38.240 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Sat Oct 21 13:59:09 2000 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; I) Date: 2000-10-21T00:00:00+00:00 List-Id: In article <8FD47616EPablo@213.25.200.9>, niewiap@widzew.net (Pawe� Niewiadomski) wrote: > If you have any idea on how to solve this problem (no dynamic > memory allocation, please) I would be grateful for sharing it > with me Keep things simple, don't always try to look for ingenious ways of using the language X := X + 1; if X = max then X := 0; end if; will work just fine And no, there is clearly no way to use a modular type in this case. To understand why, consider that the model of generics is always organized to allow shared generics, and we can't have base types whose range is dynamic at runtime! Sent via Deja.com http://www.deja.com/ Before you buy.