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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5cd2177597e1920b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!73g2000cwn.googlegroups.com!not-for-mail From: "markww" Newsgroups: comp.lang.ada Subject: Re: discriminants, what are they? Date: 17 Dec 2006 16:43:43 -0800 Organization: http://groups.google.com Message-ID: <1166402623.301255.43540@73g2000cwn.googlegroups.com> References: <1166399856.146825.149540@f1g2000cwa.googlegroups.com> NNTP-Posting-Host: 66.65.64.109 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1166402629 12921 127.0.0.1 (18 Dec 2006 00:43:49 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 18 Dec 2006 00:43:49 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: 73g2000cwn.googlegroups.com; posting-host=66.65.64.109; posting-account=cNKOMg0AAADT2ug8oGSYYXo8bsDvrHzw Xref: g2news2.google.com comp.lang.ada:7938 Date: 2006-12-17T16:43:43-08:00 List-Id: Thanks Bob, that's what I was looking for, Mark Robert A Duff wrote: > "markww" 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