From: beidler@guinness.cs.uofs.edu (Jack Beidler)
Subject: Re: Use of generic child formal package
Date: 8 Mar 1995 00:12:46 GMT
Date: 1995-03-08T00:12:46+00:00 [thread overview]
Message-ID: <3jispu$ooe@gopher.cs.uofs.edu> (raw)
In-Reply-To: D4IyJB.5C2@thomsoft.com
In article <D4IyJB.5C2@thomsoft.com>, falis@east.alsys.com (Ed Falis) writes:
|> Hopefully, I'm not garbling the lingo too much.
|>
|> I'd like to provide an instance of a generic child unit as a formal package
|> actual parameter to another generic. To wit:
|>
|> generic
|> -- parent's formals
|> package parent is ... ; end parent;
|>
|> generic
|> -- child's formals
|> package parent.child is ...; end parent.child;
|>
|>
|> with parent;
|> generic
|> -- client formals
|> package client is
|>
|> package parent_instance is new parent(...);
|>
|> end client;
|>
|>
|> -- Here's the hitch:
|> with parent.child;
|> generic
|>
|> -- ??:
|> with parent_instance.child is new parent.child (...);
|> package client.child is ...;
|>
Try the following:
with parent.child;
package client is ...
package My_Parent is new parent (...);
package My_Child is new parent.child;
-- generics parms for child instantiation
-- only if the child had extra generic parms
...
end client;
--
+----------------------------------------+------------------------+
|John (Jack) Beidler ++ beidler@cs.uofs.edu |
| Professor, Computing Sciences Dept. ++ |
| University of Scranton ++ (717) 941-7446 (voice) |
| Scranton, PA 18510 ++ (717) 941-4250 (FAX) |
| WWW site: http://gopher.cs.uofs.edu/CS/cs.home.html |
+------------------------------------+----------------------------+
prev parent reply other threads:[~1995-03-08 0:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-02-24 22:01 Use of generic child formal package Ed Falis
1995-02-28 20:35 ` Tucker Taft
1995-03-02 2:48 ` Robert Dewar
1995-03-08 0:12 ` Jack Beidler [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox