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,e0bc6f4c0c1f6e5e X-Google-Attributes: gid103376,public From: nobody@REPLAY.COM (Anonymous) Subject: Re: Assistance on extending a private record from a private record with a generic attribute... Date: 1998/04/17 Message-ID: <199804171332.PAA11214@basement.replay.com>#1/1 X-Deja-AN: 345024994 Content-Transfer-Encoding: 7bit References: Content-Type: text/plain; charset=us-ascii Organization: Replay Associates, L.L.P. Mail-To-News-Contact: postmaster@nym.alias.net X-001: Replay may or may not approve of the content of this posting X-002: Report misuse of this automated service to X-URL: http://www.replay.com/remailer/ Newsgroups: comp.lang.ada Date: 1998-04-17T00:00:00+00:00 List-Id: <35364E81.94B51B0F@amherst.com> On Thu, 16 Apr 1998 21:26:10 GMT, stt@houdini.camb.inmet.com (Tucker Taft) wrote: > Christopher Campise (crc@amherst.com) wrote: > > : Ada95 on a Rational Apex compiler: > : I have a "superclass" with a private record consisiting of a generic > : type attribute. I need to inherit this from within another package but > : am receiving compiler errors stating that "a record extension will be > : provided iff the parent record is tagged," (which it is). Is this even > : legal? I looked everywhere for examples and found none that relate to > : this, adahome.com, Programming in Ada95, Rendezvous with Ada95, plus > : other tutorials. Any ideas? > > You cannot select items from a generic package. You must > first instantiate the generic package, and select items from > the instance. > > : For example: > > : *********** > : generic > : type Value_Class is private; > > : package Generic is > : type Class is tagged private; > ... Surprisingly, even Tucker Taft did not point out that you cannot have a package named Generic. "generic" is a reserved word. Assuming that you change the name, perhaps to Generic_Class, then you still don't have a package, so you can't refer to its type Class. You need to instantiate the generic: package My_Class is new Generic_Class (Value_Class => My_Type); Now you have a package named My_Class, and may refer to My_Class.Class. Jeff Carter PGP:1024/440FBE21 My real e-mail address: ( carter @ innocon . com ) "Son of a window-dresser." Monty Python & the Holy Grail Posted with Spam Hater - see http://www.compulink.co.uk/~net-services/spam/