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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,369ed27a1a2dd2cb X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: QUIZ: To be or not to be (able to post) Date: 1997/10/03 Message-ID: #1/1 X-Deja-AN: 277874151 References: <610a7h$a7n@news3.his.com> <6114h5$pmk@news3.his.com> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1997-10-03T00:00:00+00:00 List-Id: In article <6114h5$pmk@news3.his.com>, Joel VanLaven wrote: >... I am just a little >surprised that the "obvious" big difference (between float and float'base) >wasn't really a difference at all. If you say: type T1 is range -10..10; type T2 is digits 5 range -10.0..10.0; then T1 and T2 are constrained. On the other hand, if you say: type T3 is digits 5; -- no range given here then T3 is unconstrained. So T3 is the same thing as T3'Base (both are unconstrained). But T1 and T1'Base are different, and T2 and T2'Base are different (T1 and T2 are constrained; T1'Base and T2'Base are unconstrained). The predefined floating point types, such as Float, are like T3 in this regard. That is, Float is unconstrained, so Float is the same thing as Float'Base. This is because the declaration of Float has no "something .. something else". See A.1(20). The predefined integer types, such as Integer, are constrained. This all makes sense to me. The "surprise" probably comes from the fact that this is different from Ada 83, where the first subtype was always constrained in the floating-point case. - Bob