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,74a56083ffbe573d X-Google-Attributes: gid103376,public From: rgilbert@unconfigured.xvnews.domain (Bob Gilbert) Subject: Re: Zoo question Date: 1996/08/14 Message-ID: <4usukc$p47@zeus.orl.mmc.com>#1/1 X-Deja-AN: 174158300 references: <3211EA8F.167EB0E7@escmail.orl.mmc.com> organization: The unconfigured xvnews people reply-to: rgilbert@unconfigured.xvnews.domain newsgroups: comp.lang.ada Date: 1996-08-14T00:00:00+00:00 List-Id: In article <3211EA8F.167EB0E7@escmail.orl.mmc.com>, Ted Dennison writes: > > Close. However, integer is not the only predefined "integer type" allowed. > Thus it could well be something like Short_Integer that the compiler > chooses to derive Animal_ID's base type from. > > Of course this is a nit upon a nit. In effect if not in detail, you were > correct (and at a certian level of detail, we are all incorrect). Okay, although I would have (wrongly) assumed that type integer would have been selected. I guess the point is that the integer type eventually used as the base type most likely won't have a constrained range of 1 .. 5, and the attribute 'Succ uses the constraints of the base type, not any additional constraints imposed on it by the (implied) subtype. > However, I should (and did) point out that the constraint check does NOT have > to happen (and does not have to happen within the begin block). That is why > Ada (95) now has the 'valid attribute. Right, so depending on the particular (Ada 83) compiler, the code may or may not produce the desired result, depending on whether the constraint check is performed within the begin block or not. -Bob