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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,772ae8afc5db35f2 X-Google-Attributes: gid103376,public From: nospam@thanks.com.au (Don Harrison) Subject: Re: Can't export object of private type Date: 1999/03/04 Message-ID: #1/1 X-Deja-AN: 451081318 Sender: news@syd.csa.com.au X-Nntp-Posting-Host: dev7 References: <7bk6gh$6d9$2@plug.news.pipex.net> Organization: CSC Australia, Sydney Reply-To: nospam@thanks.com.au Newsgroups: comp.lang.ada Date: 1999-03-04T00:00:00+00:00 List-Id: Nick Roberts wrote: :Also, you need to remove the function Solo_T from package T (it does nothing It exports a reference to the singleton. : .. and won't compile), GNAT didn't have any trouble. :and move the declaration of Self from the private part :of package T.Child (where it doesn't need to be, and will cause an :unnecessary dependency) to the package's body. An unnecessary dependency on what? :The 'access' parameters in :the subprograms need only be 'in out' parameters; this is (pointedly!) a :case where access parameters serve no useful purpose.. The access-parameters serve two useful purposes: - An access entity of any access type to T_Type'Class can be used as an actual parameter. - That entity can't be corrupted because access-parameters are in-mode. : (because the objects :are always going to be declared at library level). : type T_Array_Type is array (T_Index_Type) of Access_Class_T_Type; : : T_Array: T_Array_Type := ( : 1 => T.Child.Solo_T.all'Access, -- 1) : 2 => T.OTher_Child.Solo_T.all'Access); -- 1) This is client - not library - code. Otherwise: perfect! Thanks! :) -- Don (Harrison). donh at syd.csa.com.au