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,e51581f95441cb4 X-Google-Attributes: gid103376,public From: kst@sd.aonix.com (Keith Thompson) Subject: Re: Discriminant as default initial value Date: 1997/04/07 Message-ID: #1/1 X-Deja-AN: 232165142 Sender: news@thomsoft.com (USENET News Admin @flash) X-Nntp-Posting-Host: pulsar References: <199704020043_MC2-13A2-3DDB@compuserve.com> Organization: Aonix, San Diego, CA, USA Newsgroups: comp.lang.ada Originator: kst@pulsar Date: 1997-04-07T00:00:00+00:00 List-Id: In dewar@merv.cs.nyu.edu (Robert Dewar) writes: [...] > Using a discriminant in the expression for a default value is perfectly > valid (it does not have to be on its own, it can be used within an > expression, e.g. you can have a default expression A+B where both A > and B are discriminants). This is legal because there is no rule that > says it is illegal. And it should work properly! Agreed. For more details on the allowed uses of a discriminant, see RM95-3.8(12): 12 A name that denotes a noninherited discriminant is allowed within the declaration of the type, but not within the discriminant_ part. If the discriminant is used to define the constraint of a component, the bounds of an entry family, or the constraint of the parent subtype in a derived_type_definition then its name shall appear alone as a direct_name (not as part of a larger expression or expanded name). A discriminant shall not be used to define the constraint of a scalar component. -- Keith Thompson (The_Other_Keith) kst@sd.aonix.com <*> TeleSo^H^H^H^H^H^H Alsy^H^H^H^H Thomson Softw^H^H^H^H^H^H^H^H^H^H^H^H^H Aonix 5040 Shoreham Place, San Diego, CA, USA, 92122-5989 "Humor is such a subjective thing." -- Cartagia