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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Q: discrete_subtype_definition: static only cases? Date: Sun, 7 Jun 2020 23:02:28 +0200 Organization: Adalog Message-ID: References: <2d4d6645-7055-4564-a854-6da5fc83af4eo@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 7 Jun 2020 21:02:27 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="6cde674a27923d10e577909704ce976c"; logging-data="5585"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Qj41+zgmyaZUjOfWAitdL" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 Cancel-Lock: sha1:o72XyT5FONwHBtZN67+3CUy9WtE= In-Reply-To: Content-Language: fr Xref: reader01.eternal-september.org comp.lang.ada:59011 Date: 2020-06-07T23:02:28+02:00 List-Id: Le 07/06/2020 à 13:36, Niklas Holsti a écrit : > On 2020-06-07 13:40, J-P. Rosen wrote: >> Le 07/06/2020 à 11:27, gautier_niouzes@hotmail.com a écrit : >>> Are there cases in the Ada syntax where a discrete_subtype_definition >>> (RM 3.6 (6)) is expected to be determined at compile-time? >>> >>> For instance, for array indices or "for" loops, it can be static or >>> dynamic. >>> Same for subtypes. >> >> No. The basic principle is that types are static (they determine the >> underlying representation) and subtypes are dynamic. > > Subtype indications in case statements and record type declarations with > variant parts must be static. > But these are subtype indications, not subtype definitions. -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr