comp.lang.ada
 help / color / mirror / Atom feed
From: "Rick Santa-Cruz" <rick_santa_cruz75@msn.com>
Subject: Re: private classes
Date: Sat, 2 Oct 2004 23:12:21 +0200
Date: 2004-10-02T23:12:21+02:00	[thread overview]
Message-ID: <cjn5p0$f6v$03$1@news.t-online.com> (raw)
In-Reply-To: cjn3e9$moq$05$1@news.t-online.com

Hi,

> 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;
Ok, I got it. The declaration of the procedure has to be before the "type 
Derived_1 is new Base_1 with private;". Although I don't understand the 
sense of this, but ok ;).

Bye,
Rick





  reply	other threads:[~2004-10-02 21:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-02 20:35 private classes Rick Santa-Cruz
2004-10-02 21:12 ` Rick Santa-Cruz [this message]
2004-10-03 19:11   ` Ludovic Brenta
2004-10-03 16:36 ` Martin Krischik
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox