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.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8b8748382fcfacc1 X-Google-Attributes: gid103376,public From: "Steve Folly" Subject: Re: friend classes in ada95 Date: 2000/04/14 Message-ID: <8d7lqt$cgu$1@epos.tesco.net>#1/1 X-Deja-AN: 611217989 References: <38F6B617.34E216A7@emw.ericsson.se> <38F6D9F0.F0DE08E4@geocities.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Organization: Tesco ISP X-MSMail-Priority: Normal Newsgroups: comp.lang.ada Date: 2000-04-14T00:00:00+00:00 List-Id: "Julian Day" wrote in message news:38F6D9F0.F0DE08E4@geocities.com... > Stefan Folkesson wrote: > > > In ADA95, is there a way to make the private part of one class > > accessable from another (see friend classes in C++)? > > > > The technique to use is a hierarchical package structure. > > package X is > ... > private > ... > end X; > > package X.Y is > -- Cannot see X's private part Not true - according to the LRM (I forget which section off the top of my head) child package visibility rules are the same as if you had declared (in this case) Y inside X at the end of it's private part after all other declarations. > private > -- Can see X's private part > end X.Y; > > package body X.Y is > -- Can see X's private part > end X.Y; > -- Regards, Steve Folly. http://www.spfweb.co.uk/ donationsto:myaccount@mybank.co.uk mailto:steve.folly@mail.com