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,faf469c89f73f91d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-13 13:20:30 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!dispose.news.demon.net!demon!peernews!peer.cwci.net!news5-gui.server.ntli.net!ntli.net!news6-win.server.ntlworld.com.POSTED!not-for-mail From: "chris.danx" Newsgroups: comp.lang.ada References: <721b6d80.0202131302.1ccce2ed@posting.google.com> Subject: Re: Package Instances??? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Message-ID: Date: Wed, 13 Feb 2002 21:21:29 -0000 NNTP-Posting-Host: 213.104.121.107 X-Complaints-To: abuse@ntlworld.com X-Trace: news6-win.server.ntlworld.com 1013635225 213.104.121.107 (Wed, 13 Feb 2002 21:20:25 GMT) NNTP-Posting-Date: Wed, 13 Feb 2002 21:20:25 GMT Organization: ntlworld News Service Xref: archiver1.google.com comp.lang.ada:19977 Date: 2002-02-13T21:21:29+00:00 List-Id: "Yates" wrote in message news:721b6d80.0202131302.1ccce2ed@posting.google.com... > 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? Why would you need to for ordinary work? All the public types and subroutines will be available to you when you with it the first time, so you only need to 'with' it in a package once to use it in that package. In the case of generics you can instantiate multiple packages for different types (*maybe* even the same ones over again), but if your just starting you probably don't need generics.