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,fc203759328316c2 X-Google-Attributes: gid103376,public From: Laurent.Guerby@enst-bretagne.fr (Laurent Guerby) Subject: Re: Question about tagged types and functions Date: 1996/05/22 Message-ID: <4xpw7xpoc6.fsf@leibniz.enst-bretagne.fr>#1/1 X-Deja-AN: 156034036 sender: guerby@leibniz.enst-bretagne.fr references: <4ntg05$qgc@ns.interserf.net> content-type: text/plain; charset=US-ASCII organization: Telecom Bretagne mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-05-22T00:00:00+00:00 List-Id: David> Why does Ada-95 (GNAT 3.01a) tell me that I also *must* have: David> function Create return DerivedType; David> There is something going on with tagged types and functions David> that I don't understand because if I use David> procedure Create(a : out BaseType); David> it (Ada-95) does not object. The status of functions (primitives) that dispatch on result is special in Ada 95. See RM95-3.9.3(4-6). Or better, read the paper "Ada 9X Tagged Types and their Implementation in GNAT" by Cyrille Comar and Brett Porter (may be available from http://www.gnat.com, if not in the TriAda94 Conference proceedings). There's a section devoted to this error message (4.4) (among other OO error messages ;-). -- -- Laurent Guerby, student at Telecom Bretagne (France), Team Ada. -- "Use the Source, Luke. The Source will be with you, always (GPL)." -- http://www-eleves.enst-bretagne.fr/~guerby/ (GATO Project). -- Try GNAT, the GNU Ada 95 compiler (ftp://cs.nyu.edu/pub/gnat).