comp.lang.ada
 help / color / mirror / Atom feed
From: sk <noname@myob.com>
Subject: Re: Child packages question
Date: Mon, 08 Apr 2002 21:17:28 -0500
Date: 2002-04-08T21:17:28-05:00	[thread overview]
Message-ID: <mailman.1018322344.15608.comp.lang.ada@ada.eu.org> (raw)
In-Reply-To: fug4bukpc28gaqh1sci8m9ql2k1oa54ms5@4ax.com

Hi,

-----------------------------------------------------
-- file1 : car.ads
package Car is

    procedure Accelerate;

end Car;

-----------------------------------------------------
-- file2 : car.ads
with Car.Engine;

package body Car is 

    procedure Accelerate is
    begin
        Car.Engine.Pump_More_Gas;
    end Accelerate;

end Car;  

-----------------------------------------------------
-- file2 : car-engine.ads
private package Car.Engine is

    procedure Pump_More_Gas;

end Car.Engine;

-----------------------------------------------------
-- file2 : car-engine.adb
package body Car.Engine is

    procedure Pump_More_Gas is
    begin
        null;
    end Pump_More_Gas;

end Car.Engine;

-----------------------------------------------------
-- file2 : Mario_Andretti.adb
with Car;
--with Car.Engine;

procedure Mario_Andretti is

begin
    Car.Accelerate;
    
--    Car.Engine.Accelerate;

end Mario_Andretti;
-----------------------------------------------------

Try uncommenting :
"with Car.Engine" 
"Car.Engine.Accelerate"

Compiler should complain :-)

-- 
-------------------------------------
-- Merge vertically for real address
-------------------------------------
s n p @ t . o
 k i e k c c m
-------------------------------------



  reply	other threads:[~2002-04-09  2:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-09  1:33 Child packages question James Ross
2002-04-09  2:17 ` sk [this message]
2002-04-09  4:39   ` James Ross
2002-04-09  4:40     ` sk
2002-04-09  6:37     ` Ingo Marks
2002-04-09  3:17 ` Pat Rogers
2002-04-09  3:58 ` Randy Brukardt
2002-04-09  8:28   ` tmoran
2002-04-09 15:11     ` Ted Dennison
2002-04-10 23:02       ` Randy Brukardt
     [not found] <3CB24F38.2D03C71A@myob.com>
2002-04-09  2:54 ` Steven Deller
     [not found] <000101c1df71$eb7d9920$2137e5c0@rational.com>
2002-04-09  3:22 ` sk
replies disabled

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