comp.lang.ada
 help / color / mirror / Atom feed
From: "Riyaz Mansoor" <s800032@student.uq.edu.au>
Subject: Re: generic package dilemma
Date: 1999/11/18
Date: 1999-11-18T09:37:58+00:00	[thread overview]
Message-ID: <810hdm$1fg$1@bunyip.cc.uq.edu.au> (raw)
In-Reply-To: 3832e27f_1@news1.prserv.net

> That's because these are different instantiations of Gen_Pack2 and
> Gen_Pack3.  The solution is to have Gen_Pack4 import the instantiations,
> instead of making its own:

i tried  to do the above as u've suggested. just a note i forgot in the
previous post. pack4 needs functins in pack2 and pack3 but pack4 can/should
be able to manipulate then through pack1. hence the initialisation of pack2
and pack3 from within pack1.

>
> procedure main is
>   package pack1 is new gen_pack1; use pack1;
>   package pack4 is new gen_pack4 (Pack1.Pack2, Pack1.Pack3); use pack4;
>                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
>   blah blha
> begin
>   blah
> end main;

hence i've initialise main as

procedure main is
    package pack1 is new gen_pack1; use pack;
    package pack4 is new gen_pack4(pack1); use pack4;
    blah
end main;

for gen_pack4

> generic
>   with package Pack2 is new Gen_Pack2 (<>);
>   with package Pack3 is new Gen_Pack3 (<>);

hence pack4 is initialised as

generic
    with package pack1 is new  gen_pack1(<>);

i believe this is the same as u've suggested. but however it does not
compile. it gives an error at the following point in the main.

procedure main is
    package pack1 is new gen_pack1; use pack;
    package pack4 is new gen_pack4({error here}pack1); use pack4;
    blah
end main;

the error message says that "previous error in declaration of formal
package" and i dont' know what that means!!

any help appreciated

thanx
riyaz






  parent reply	other threads:[~1999-11-18  0:00 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-17  0:00 generic package dilemma Riyaz Mansoor
1999-11-17  0:00 ` Matthew Heaney
1999-11-17  0:00   ` Mats Weber
1999-11-17  0:00     ` Matthew Heaney
1999-11-18  0:00       ` Robert A Duff
1999-11-18  0:00         ` Matthew Heaney
1999-11-18  0:00       ` Mats Weber
1999-11-18  0:00         ` Matthew Heaney
1999-11-19  0:00           ` Mats Weber
1999-11-19  0:00             ` Vladimir Olensky
1999-11-19  0:00             ` Matthew Heaney
1999-11-19  0:00               ` Robert Dewar
1999-11-19  0:00                 ` Matthew Heaney
1999-11-20  0:00                   ` Mats Weber
1999-11-19  0:00                 ` Robert I. Eachus
1999-11-22  0:00                   ` Robert Dewar
1999-11-22  0:00                     ` Matthew Heaney
1999-11-19  0:00               ` Mats Weber
1999-11-22  0:00                 ` Robert Dewar
1999-11-22  0:00                   ` Mats Weber
1999-11-22  0:00                     ` Robert A Duff
1999-11-23  0:00                       ` Robert Dewar
1999-12-01  0:00                       ` Robert I. Eachus
1999-12-01  0:00                         ` Robert I. Eachus
1999-11-22  0:00                   ` Larry Kilgallen
1999-11-23  0:00                     ` Robert Dewar
1999-11-22  0:00                   ` Robert A Duff
1999-11-23  0:00                     ` Robert Dewar
1999-11-29  0:00                       ` Robert A Duff
1999-12-01  0:00                         ` Robert Dewar
1999-12-01  0:00                       ` Robert A Duff
1999-12-02  0:00                         ` Mats Weber
1999-12-03  0:00                           ` Robert Dewar
1999-12-03  0:00                             ` Robert A Duff
1999-12-06  0:00                               ` Robert Dewar
1999-12-03  0:00                             ` Ted Dennison
1999-12-04  0:00                               ` Robert Dewar
1999-11-22  0:00                   ` Mats Weber
1999-11-22  0:00                     ` Bryce Bardin
1999-11-23  0:00                     ` Robert Dewar
1999-11-19  0:00       ` Robert Dewar
1999-11-18  0:00   ` Riyaz Mansoor [this message]
1999-11-19  0:00     ` Robert Dewar
1999-11-19  0:00   ` Robert Dewar
replies disabled

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