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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site verdix.UUCP Path: utzoo!linus!decvax!tektronix!ogcvax!verdix!greg From: greg@verdix.UUCP Newsgroups: net.lang.ada Subject: static subtypes Message-ID: <159@verdix.UUCP> Date: Fri, 4-Nov-83 18:52:28 EST Article-I.D.: verdix.159 Posted: Fri Nov 4 18:52:28 1983 Date-Received: Mon, 7-Nov-83 07:18:40 EST Organization: Verdix List-Id: It has been noted, and raised as an issue in this news group that an in integer type declaration: type T is range L..R; -- where L and R must be static The type T is *not* a static range. This comes about because in LRM 3.5.4 an integer type declaration is defined as being equivalent to the following pair of declarations: type integer_type is new predefined_integer_type; subtype T is integer_type range integer_type(L)..integer_type(R); Explicit type conversions are not static, thus the subtype T above is not a static subtype. Compare this with the derived type declaration: type T is new INTEGER range L..R; -- where L and R are static. Here, the derived subtype T is a static subtype because from LRM 3.4(3): "If a constraint exists for the parent subtype, a similar constraint exists for the derived subtype; the only difference is that for a range constraint, and likewise for a floating or fixed point constraint that includes a range constraint, the value of each bound is replaced by the corresponding value of the derived type" ----------------------------------- Thus, no conversions are required or implied. Is this difference between integer type definitions and derived type definitions intended? Greg Burns, Verdix Corporation gburns.oregon-grad@csnet-relay {tektronix!ogcvax allegra!ogcvax inteloa decwrl!sequent}!verdix!greg