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!feeder.eternal-september.org!news.uzoreto.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Q: discrete_subtype_definition: static only cases? Date: Sun, 7 Jun 2020 14:36:30 +0300 Organization: Tidorum Ltd Message-ID: References: <2d4d6645-7055-4564-a854-6da5fc83af4eo@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net nXGuU4gOi4MHgC/n4wkqDgnGbay+Jt/5AMGY5/kVknXWqqoIoR Cancel-Lock: sha1:pBADAcX5VrXO3JpzN2ofgQYQOjc= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 In-Reply-To: Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:58999 Date: 2020-06-07T14:36:30+03:00 List-Id: 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 AFAIK subtypes used as array indices are never required to be static. -- Niklas Holsti niklas holsti tidorum fi . @ .