From: kst@sd.aonix.com (Keith Thompson)
Subject: Re: Discriminant as default initial value
Date: 1997/04/07
Date: 1997-04-07T00:00:00+00:00 [thread overview]
Message-ID: <E8AHu4.6H9@thomsoft.com> (raw)
In-Reply-To: dewar.859988477@merv
In <dewar.859988477@merv> 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 <http://www.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
next prev parent reply other threads:[~1997-04-07 0:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-04-02 0:00 Discriminant as default initial value Kees de Lezenne Coulande
1997-04-02 0:00 ` Scott Renfro
1997-04-02 0:00 ` Robert Dewar
1997-04-02 0:00 ` Robert Dewar
1997-04-07 0:00 ` Keith Thompson [this message]
-- strict thread matches above, loose matches on Subject: below --
1997-03-30 0:00 Kees de Lezenne Coulande
1997-03-30 0:00 ` Robert Dewar
1997-03-29 0:00 Scott Renfro
1997-03-29 0:00 ` Matthew Heaney
1997-03-30 0:00 ` Scott Renfro
1997-03-30 0:00 ` Bob Klungle
1997-03-30 0:00 ` Robert Dewar
1997-03-31 0:00 ` Bob Klungle
1997-03-31 0:00 ` Robert Dewar
1997-03-31 0:00 ` Jon S Anthony
1997-03-31 0:00 ` Robert Dewar
1997-04-02 0:00 ` Jon S Anthony
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox