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,7816de9c00c8d02a X-Google-Attributes: gid103376,public From: adaworks@netcom.com (AdaWorks) Subject: Re: Simpler question, create instance of unknown tag Date: 1996/03/26 Message-ID: #1/1 X-Deja-AN: 144324174 sender: adaworks@netcom19.netcom.com references: <4ikbhn$cl6@watnews1.watson.ibm.com> organization: NETCOM On-line Communication Services (408 261-4700 guest) newsgroups: comp.lang.ada Date: 1996-03-26T00:00:00+00:00 List-Id: Robert A Duff (bobduff@world.std.com) wrote: : Anyway, I like the above idea. Now tell me how to support this: : X: T'Class; : It would be nice ;-). Yeah, Bob. This is one of the first things one encounters in the early stages of learning Ada 95. I have been writing, for some programs, something such as: function Get return T'Class; and then, for the declaration: X : T'Class := Get; to ensure compilation. The next trick is to decide how to implement function Get. This turns out to be quite useful for some situations. But then, my guess is that you already do this too. Richard Riehle -- richard@adaworks.com AdaWorks Software Engineering Suite 27 2555 Park Boulevard Palo Alto, CA 94306 (415) 328-1815 FAX 328-1112