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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,56db82f3595e6f1e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-06 11:07:14 PST Path: archiver1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: oo programing help needed? Date: Sat, 06 Dec 2003 14:46:42 +0100 Organization: AdaCL Message-ID: <1604044.udMrr1xGa3@linux1.krischik.com> References: <4948f537.0312060221.6edfa391@posting.google.com> Reply-To: krischik@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1070737538 04 19786 x01sGZrvAqJc-Ik 031206 19:05:38 X-Complaints-To: usenet-abuse@t-online.de X-ID: GtBmlkZbgedDEjNezE+FDrGn2uypidXDdUYuJqeyqvMRn5UGSoKUoo User-Agent: KNode/0.7.2 Xref: archiver1.google.com comp.lang.ada:3185 Date: 2003-12-06T14:46:42+01:00 List-Id: shoko wrote: > i have the following: > ------------------------------------------ > package one is > type one is tagged private; > type one_ptr is access all one'class; > > procedure set_name(name:String;this:in out one); > function get_name(this:one) return string; > > private > type one is tagged > record > name:String(1..256); > end record; > > > end one ; > --------------------------------------------- > with one; > > package two is > type two is new one.one with private ; > private > type two is new one.one with null record; > end two; > --------------------------------------------- > with two; > > package three is > type three is new two.two with private ; > function get_name(this:three) return string; > private > type three is new two.two with null record; > end two; > > ------------------------------------------- > package body three is > function get_name(this:three) return string > s:string(1..10); > begin > return s+ this.name; <-- no selector "name" for type three > end get_name; > > end three; > > > i get no selector "name" for type three > > how to solve this problem?????? three is not a child packages of one. While it it true that "private" is more like "protected" in C++ and Java it is also part of the package. So only child packages can acces the private section - child classes can't do that. Java has something similar but I can't remember the actual syntax (something like private proctected or protected private or so). With Regards Martin -- mailto://krischik@users.sourceforge.net http://adacl.sourceforge.net