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,b1ebfe7f8f5e385d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-05 01:14:20 PST Date: Mon, 05 May 2003 10:14:04 +0200 From: =?ISO-8859-1?Q?Rodrigo_Garc=EDa?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Generic formal access types References: <3eb23fca$1@epflnews.epfl.ch> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: lglpc31.epfl.ch Message-ID: <3eb61d59$1@epflnews.epfl.ch> X-Trace: epflnews.epfl.ch 1052122457 128.178.76.8 (5 May 2003 10:14:17 +0200) Organization: EPFL Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.vmunix.org!newsfeed.stueberl.de!solnet.ch!solnet.ch!news.imp.ch!news.imp.ch!news-zh.switch.ch!epflnews.epfl.ch!not-for-mail Xref: archiver1.google.com comp.lang.ada:36957 Date: 2003-05-05T10:14:04+02:00 List-Id: Robert A Duff wrote: > tmoran@acm.org writes: > > >>Why not >> declare >> package Instance is new Generic_Package (Integer); >> subtype Ptr is Instance.Node_Content_Ptr; >> P : Ptr; > > > That works only if you want to declare the pointer type at the same > place where the instantiation is. In many cases, you don't. For this > reason, it's almost always better to pass the pointer type into > generics. In my case, "Ptr" is already defined before the instantiation of the package and I should not change its definition. But again, I did not think of that possibility, so thanks for the suggestion. Rodrigo