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:55:29 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.online.be!zur.uu.net!ash.uu.net!xyzzy!nntp From: Jeffrey Carter Subject: Re: Package instance??? X-Nntp-Posting-Host: e246420.msc.az.boeing.com Content-Type: text/plain; charset=us-ascii Message-ID: <3C6AE94F.3754325D@boeing.com> Sender: nntp@news.boeing.com (Boeing NNTP News Access) Content-Transfer-Encoding: 7bit Organization: The Boeing Company X-Accept-Language: en References: Mime-Version: 1.0 Date: Wed, 13 Feb 2002 22:31:43 GMT X-Mailer: Mozilla 4.73 [en]C-CCK-MCD Boeing Kit (WinNT; U) Xref: archiver1.google.com comp.lang.ada:19980 Date: 2002-02-13T22:31:43+00:00 List-Id: Yates wrote: > > I am new to Ada. I'd like to know if it is possible to create multiple > instances of a package. For example, if I have a package 'My_Package', can > I do something like: > > p1 : My_Package := new My_Package > p2 : My_Package := new My_Package > ..... > > I tried this and didn't work. Is there other ways to do it? You can if My_Package is a generic package. However ... Packages are a basic concept in Ada, and this question shows such a level of misunderstanding of packages that it seems unlikely any answer will be meaningful to you until you gain a better grasp of the language. You might want to look at www.adapower.com, where you'll find language tutorials and lots of examples. If you still have a question after working through a tutorial and reviewing some examples, then we will probably be able to help you. -- Jeffrey Carter