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,FREEMAIL_FROM,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1e6b0935218e0d0,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!news.zanker.org!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: "Rick Santa-Cruz" Newsgroups: comp.lang.ada Subject: private classes Date: Sat, 2 Oct 2004 22:35:01 +0200 Organization: T-Online Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.t-online.com 1096749321 05 23322 5-cPXQpLdwEHbif 041002 20:35:21 X-Complaints-To: usenet-abuse@t-online.de X-ID: SX2l-ZZHgee9J8kaN7WpIUV1lE0vlTHnPpCsO8e7k61rFUAoPR5lYU X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original Xref: g2news1.google.com comp.lang.ada:4575 Date: 2004-10-02T22:35:01+02:00 List-Id: Hi, sorry for so many question, but always when I thought I understand it, I read further and see a new problem... so given the following source-code: package Classes is type Base_1 is tagged private; type Derived_1 is new Base_1 with private; procedure Proc(B: Base_1); private type Base_1 is tagged record Number: Integer; end record; type Derived_1 is new Base_1 with null record; end Classes; package body Classes is procedure Proc(b: Base_1) is begin null; end Proc; end Classes; with Classes; procedure main is D: Classes.Derived_1; begin Classes.Proc(D); end Main; I get an error in calling Classes.Proc(D). Although I thought that cause Derived_1 inherits from Base_1 the call should be possible. In fact exactly this I found in the book from John English in chapter 14.5. Why can't I compile such, although I thought the function Proc is visible for clients of the package Classes. My second question is then, if the above does not work (and I really wonder why) then, what would it make for a difference if instead of writing: type Derived_1 is new Base_1 with private; I write: type Derived_1 is private; and then in the private-part of the package: type Derived_1 is new Base_1 with null_record; What would be the difference between that and the definition above? Thanks tons in advance, cause I really start to become desperate ;(. Bye, Rick