comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: Modular types inside records
Date: 2000/10/21
Date: 2000-10-21T00:00:00+00:00	[thread overview]
Message-ID: <8ss7fb$5c7$1@nnrp1.deja.com> (raw)
In-Reply-To: 8FD47616EPablo@213.25.200.9

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 686 bytes --]

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.




  reply	other threads:[~2000-10-21  0:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-21  0:00 Modular types inside records Pawe� Niewiadomski
2000-10-21  0:00 ` Robert Dewar [this message]
2000-10-21  0:00   ` Pawe� Niewiadomski
2000-10-21  0:00     ` Jeff Carter
2000-10-21  0:00       ` Pawe� Niewiadomski
2000-10-23  0:00     ` Robert A Duff
2000-10-23  0:00       ` Pawe� Niewiadomski
2000-10-24  0:00         ` Robert A Duff
2000-10-25  1:50         ` Nick Roberts
2000-10-25  0:00           ` Pawe� Niewiadomski
2000-10-27 22:05         ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox