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=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:ac8:450a:: with SMTP id q10mr18707062qtn.328.1591537812360; Sun, 07 Jun 2020 06:50:12 -0700 (PDT) X-Received: by 2002:aca:4758:: with SMTP id u85mr7349618oia.175.1591537812253; Sun, 07 Jun 2020 06:50:12 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 7 Jun 2020 06:50:12 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=185.22.143.66; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 185.22.143.66 References: <2d4d6645-7055-4564-a854-6da5fc83af4eo@googlegroups.com> <9c45012c-a4b5-416d-bf1e-c2a8479ec641o@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <4b4c3687-fb26-4c75-9536-579e55df3d42o@googlegroups.com> Subject: Re: Q: discrete_subtype_definition: static only cases? From: AdaMagica Injection-Date: Sun, 07 Jun 2020 13:50:12 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:59005 Date: 2020-06-07T06:50:12-07:00 List-Id: 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.