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,95971bf29a745ff4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-13 14:25:34 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: x24702@usma.edu (Zach Swanson) Newsgroups: comp.lang.ada Subject: Re: Package instance??? Date: 13 Feb 2002 14:25:33 -0800 Organization: http://groups.google.com/ Message-ID: <50c1a1b.0202131425.287cdaa5@posting.google.com> References: NNTP-Posting-Host: 134.240.36.230 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1013639134 24119 127.0.0.1 (13 Feb 2002 22:25:34 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 13 Feb 2002 22:25:34 GMT Xref: archiver1.google.com comp.lang.ada:19979 Date: 2002-02-13T22:25:34+00:00 List-Id: "Yates" wrote > if I have a package 'My_Package', can > I do something like: > > p1 : My_Package := new My_Package > p2 : My_Package := new My_Package Lets assume you have some packge like ada.integer_text_io. then => package int_io renames ada.integer_text_io; will rename that package to your specified identifier. The exact syntax for package renaming declarations is in section 8.5.3 of the Language Reference Manual, page 154. Or you can create an entirely new instance of a package to instantiate some portion of a generic package. ie. => type small_natural is new natural range 1..10; package small_natural_io is new ada.text_io.integer_io(small_natural'range); What you were trying to do in your original example is syntactically incorrect. If your goal was to create two seperate packages using the same unit as a base for these, then you should probably look into generic units.