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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8e396f80f7d741d0 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-08 18:02:04 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!gatech!psuvax1!news.cc.swarthmore.edu!netnews.upenn.edu!gopher.cs.uofs.edu!guinness.cs.uofs.edu!beidler From: beidler@guinness.cs.uofs.edu (Jack Beidler) Newsgroups: comp.lang.ada Subject: Re: Use of generic child formal package Date: 8 Mar 1995 00:12:46 GMT Organization: Department of Computing Sciences Distribution: world Message-ID: <3jispu$ooe@gopher.cs.uofs.edu> References: NNTP-Posting-Host: guinness.cs.uofs.edu Date: 1995-03-08T00:12:46+00:00 List-Id: In article , 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 | +------------------------------------+----------------------------+