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 X-Google-Thread: 103376,b1ebfe7f8f5e385d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-01 06:00:57 PST Date: Thu, 01 May 2003 15:00:49 +0200 From: =?ISO-8859-15?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: <3eb01630@epflnews.epfl.ch> <3eb0e397@epflnews.epfl.ch> <1459423.SpdnhGgvRt@linux1.krischik.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit NNTP-Posting-Host: lglpc31.epfl.ch Message-ID: <3eb11a85@epflnews.epfl.ch> X-Trace: epflnews.epfl.ch 1051794053 128.178.76.8 (1 May 2003 15:00:53 +0200) Organization: EPFL Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsmi-us.news.garr.it!NewsITBone-GARR!news.mailgate.org!news-zh.switch.ch!epflnews.epfl.ch!not-for-mail Xref: archiver1.google.com comp.lang.ada:36805 Date: 2003-05-01T15:00:49+02:00 List-Id: Martin Krischik wrote: > Rodrigo Garc�a wrote: > > should > > generic > type Access_Type is private; > Null_Value : Access_Type := nul; > > not work as well? No, it does not work. The compiler does not know until you instantiate the package wether Access_Type is really an access type, so it will not accept "null" as initial value for Null_Value. That is, in fact, the problem and the reason why I would want to express somehow that "Access_Type" must be instantiated by an actual access type without necessarily specifying the accessed object type. I do not know if I made myself clear, but you can always try to compile your solution in order to convince you... Rodrigo > > Regards > > Martin > > >>That seems a nice workaround, although I still have to pass two >>parameters during instantiation. I will give it a try! >> >>Thanks, >> >>Rodrigo >> >>Chad R. Meiners wrote: >> >>How about >> >>generic >> type Access_Type is private; >> Null_Value : Access_Type; >> >>-CRM > >