comp.lang.ada
 help / color / mirror / Atom feed
From: "markww" <markww@gmail.com>
Subject: Re: discriminants, what are they?
Date: 17 Dec 2006 16:43:43 -0800
Date: 2006-12-17T16:43:43-08:00	[thread overview]
Message-ID: <1166402623.301255.43540@73g2000cwn.googlegroups.com> (raw)
In-Reply-To: <wccy7p69h60.fsf@shell01.TheWorld.com>

Thanks Bob, that's what I was looking for,

Mark

Robert A Duff wrote:
> "markww" <markww@gmail.com> writes:
>
> > Hi,
> >
> > Can explain what an Ada discriminant is? I found this definition but
>
> It's a parameter that can be passed to a type when making an object of
> the type, sort of like a parameter passed to a procedure when making a
> call to that procedure.  It can be used inside the type to determine which
> variant you want, or the bounds of an array, or to pass further along to
> another discriminant of a component type, or in an expression that
> initializes a component.
>
> Another view: it's a constant component.  Once you give a discriminant
> of a particular object a value, that value cannot change.
>
> > I'm new to Ada so I can't quite understand the technical definition.
> >
> > http://www.grammatech.com/rm95html-1.0/rm9x-03-07.html
>
> Indeed, this technical definition is rather arcane.  You should look at
> a textbook or tutorial that gives examples.
>
> That's not even the latest version of the Ada RM, by the way...
> 
> - Bob




  reply	other threads:[~2006-12-18  0:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-17 23:57 discriminants, what are they? markww
2006-12-18  0:33 ` Robert A Duff
2006-12-18  0:43   ` markww [this message]
2006-12-18 10:23   ` Dmitry A. Kazakov
2006-12-18  9:35 ` gautier_niouzes
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox