From: AdaMagica <christ-usch.grein@t-online.de>
Subject: Re: Q: discrete_subtype_definition: static only cases?
Date: Sun, 7 Jun 2020 06:50:12 -0700 (PDT)
Date: 2020-06-07T06:50:12-07:00 [thread overview]
Message-ID: <4b4c3687-fb26-4c75-9536-579e55df3d42o@googlegroups.com> (raw)
In-Reply-To: <f040a142-4821-4a99-9a4f-63caf1aca3d5o@googlegroups.com>
Am Sonntag, 7. Juni 2020 15:14:49 UTC+2 schrieb gautier...@hotmail.com:
> ...plus, the keyword "type" is used and not "subtype". And /anon/ could itself be dynamic (an array of a named dynamic (sub)type).
> So basically types are static, except when they aren't ;-)
Nonono, types in Ada are always anonymous. What you name in a *type declaration* is the *first subtype*.
type My_Int is range 1 .. 10;
The anonymous type of this type declaration comprises the complete set of mathematical integers (only restricted by storage). Named numbers make use of this fact:
Big: constant := My_Int'Base'Last + 10**100;
Here, the "+" operator is that of My_Int'Base.
next prev parent reply other threads:[~2020-06-07 13:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-07 9:27 Q: discrete_subtype_definition: static only cases? gautier_niouzes
2020-06-07 10:40 ` J-P. Rosen
2020-06-07 11:36 ` Niklas Holsti
2020-06-07 12:05 ` Niklas Holsti
2020-06-07 21:02 ` J-P. Rosen
2020-06-08 4:55 ` gautier_niouzes
2020-06-07 12:13 ` gautier_niouzes
2020-06-07 13:02 ` Jeffrey R. Carter
2020-06-07 13:14 ` gautier_niouzes
2020-06-07 13:50 ` AdaMagica [this message]
2020-06-07 14:11 ` gautier_niouzes
2020-06-07 13:00 ` Jeffrey R. Carter
2020-06-11 5:36 ` reinert
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox