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,85f05a59d3141bd3 X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: discriminants and tagged types Date: 1998/09/02 Message-ID: #1/1 X-Deja-AN: 387158616 Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.camb.inmet.com References: <01bdd676$82f6cfa0$f330ea9e@ukp03332> Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1998-09-02T00:00:00+00:00 List-Id: Bob Fletcher (bob@radge.globalnet.co.uk) wrote: : Is there a restriction on using descriminants in tagged types in Ada 95? One restriction is that you cannot give defaults for the discriminants, so their value needs to be specified when an object is created. Also, when you extend a tagged type, you must inherit the discriminants, or completely replace them with a new set. : ... I : know it can't be done in the GNAT compiler, it spits out an error, but my : girlfriend swears blind that the CASE tool they are using on the project : she's working on has produced a tagged type with a discriminant. I warned : her that I'm pretty sure this won't work, but maybe it's a compiler issue, : although I can't imagine it would be. : Bob Fletcher : -- -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ Intermetrics, Inc. Burlington, MA USA 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,85f05a59d3141bd3 X-Google-Attributes: gid103376,public From: eachus@spectre.mitre.org (Robert I. Eachus) Subject: Re: discriminants and tagged types Date: 1998/09/02 Message-ID: #1/1 X-Deja-AN: 387230899 References: <01bdd676$82f6cfa0$f330ea9e@ukp03332> Organization: The Mitre Corp., Bedford, MA. Newsgroups: comp.lang.ada Date: 1998-09-02T00:00:00+00:00 List-Id: In article <01bdd676$82f6cfa0$f330ea9e@ukp03332> "Bob Fletcher" writes: > Is there a restriction on using descriminants in tagged types in Ada 95? Yes, you cannot provide defaults for discriminants of a tagged type. (RM 3.7(11)) > I know it can't be done in the GNAT compiler, it spits out an error... What can't be done? It could be you are violating 3.7(11) or some other rule, but I'd have to see the code. -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...