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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d57302f2954365e1 X-Google-Attributes: gid103376,public From: Mats Weber Subject: Re: Question about base types Date: 1997/02/10 Message-ID: <32FF717F.918@elca-matrix.ch>#1/1 X-Deja-AN: 217923261 references: <32FB5B4A.1B95@elca-matrix.ch> content-type: text/plain; charset=us-ascii organization: ELCA Matrix SA mime-version: 1.0 reply-to: Mats.Weber@elca-matrix.ch newsgroups: comp.lang.ada x-mailer: Mozilla 3.01 (Macintosh; I; PPC) Date: 1997-02-10T00:00:00+00:00 List-Id: > Mats, you are confused, the base type (and hence the range of intermediate > results) is always unconstrained, so that if you write: > > subtype Real is digits 7 range 0.0 .. 1.0; should type instead of subtype, right ? > as in the original result, you will still get an unconstrained 7 digit > base type. So you are saying that type Real is digits 7 range 0.0 .. 1.0; -- (1) and type Real_Base is digits 7; subtype Real is Real_Base range 0.0 .. 1.0; -- (2) are equivalent except for the existence of the name Real_Base ? Well that's not what I get from reading RM 3.5.7(10). In the first case, I get a safe (and base) range of at least -1.0 .. 1.0, and in the second, - 10.0 ** 28 .. 10.0 ** 28. Now I know that this is not true for any reasonable implementation because floating point base types are always created from a finite set of representations available on the machine, but according to the RM there could exist a legal implementation of Ada 95 for which 100.0 is a possible value of Real'Base in variant (2) but not in variant (1). Or am I missing soemthing ? (If I am, then the RM is confusing).