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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9ed2b1e061ff269d X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Nobody Newsgroups: comp.lang.ada Subject: Re: Subtypes boundaries Date: 15 Jun 2010 01:05:45 GMT Message-ID: <87o1v9FvpjU1@mid.individual.net> References: <87nhicFa1kU1@mid.individual.net> <87nijlFa1kU2@mid.individual.net> <2b13f46b-65f9-450a-bb66-68c6093791c4@s9g2000yqd.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net lGM3f2nxi4upFRtaKw5TpwWoeCZouxLTlnS6Eyr5uYrxz7U3vD Cancel-Lock: sha1:byoHESKx6VrnMGfR9Dy1iu4NCxk= User-Agent: Pan/0.133 (House of Butterflies) Xref: g2news2.google.com comp.lang.ada:12709 Date: 2010-06-15T01:05:45+00:00 List-Id: On Tue, 15 Jun 2010 01:31:47 +0200 Yannick DuchĂȘne (Hibou57) wrote: > [ARM 2005 3.5(5)] just says: >> For a subtype_indication containing a range_constraint, either directly >> or as part of some other scalar_constraint, the type of the range shall >> resolve to that of the type determined by the subtype_mark of the >> subtype_indication. > The annotated ARM says: 3.5 Scalar Types, 8.a Ramification: Only range_constraints (explicit or implicit) impose conditions on the values of a scalar subtype. The other scalar_constraints, digit_constraints and delta_constraints impose conditions on the subtype denoted by the subtype_mark in a subtype_indication, but don't impose a condition on the values of the subtype being defined. Therefore, a scalar subtype is not called constrained if all that applies to it is a digits_constraint. Decimal subtypes are subtle, because a digits_constraint without a range_constraint nevertheless includes an implicit range_constraint. What I understand is that a subtype shall in maximum contain all values of the subtype indicator, i.e. the superordinated type. Therefore the definition type ASTERIX range +5_000..10_000; subtype IDEFIX is ASTERIX range 1..20_000; should in ANY case cause a compile time error!!! At least I would expect this behaviour. Regards Nobody