comp.lang.ada
 help / color / mirror / Atom feed
From: limor_ru@walla.co.il (lolo27)
Subject: Re: procedure and generic package
Date: 21 Nov 2003 09:55:00 -0800
Date: 2003-11-21T09:55:00-08:00	[thread overview]
Message-ID: <92bfc3dd.0311210955.1d65f893@posting.google.com> (raw)
In-Reply-To: mailman.35.1069361762.3110.comp.lang.ada@ada-france.org

"David C. Hoos" <david.c.hoos.sr@ada95.com> wrote in message news:<mailman.35.1069361762.3110.comp.lang.ada@ada-france.org>...
> It's pretty obvious what's wrong.  What did your compiler tell you?
> 
> "lolo27" <limor_ru@walla.co.il> wrote in message
> news:92bfc3dd.0311201234.6d706aa6@posting.google.com...
> > hi
> > i need to pass a generic package to a procedure
> > what is wrong in the following code?
> >
> >
> > with  p;
> > generic
> >    with new_package is new  p(<>);
> >
> > package final_p is
> >
> >       procedure something(str:String;instant:new_package);
> >
> > end final_automat;
> >
> >
> > thanks :)
> > _______________________________________________
> > comp.lang.ada mailing list
> > comp.lang.ada@ada-france.org
> > http://www.ada-france.org/mailman/listinfo/comp.lang.ada
> >

please help me get it all right
my question is i need to write an ado that implement the generic
package.
in the ado i have a generic function that accept instant of the
generic
package.
i dont understand where to create the instant generic package in the
ads file or the adb file? and how do i pass it to the generic
function?
do i have to write generic section in the ado to create the generic
package instant?
this is what i wrote( i get subtype is reqiured in thus context)
ads:
----------------------------------------------------------
with  generic_package;
generic   
   with package new_generic is new  generic_package(<>);    
package use_generic is
      generic
      procedure generic_procedure(str:String;a:in new_generic);


end use_generic ;
----------------------------------------------------------
adb:
package body use_generic is
   procedure generic_procedure(str:String;a:in new_generic) is
   begin
      something........;
   end  generic_procedure;
end use_generic ;


thanx



  reply	other threads:[~2003-11-21 17:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-20 20:34 procedure and generic package lolo27
2003-11-20 20:46 ` Georg Bauhaus
2003-11-20 20:55 ` David C. Hoos
2003-11-21 17:55   ` lolo27 [this message]
2003-11-21 18:39     ` Marius Amado Alves
2003-11-21 18:48       ` Preben Randhol
2003-11-21 19:34         ` Marius Amado Alves
2003-11-21 19:56           ` Preben Randhol
replies disabled

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