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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a27198a3d205d507 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-21 09:55:01 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: limor_ru@walla.co.il (lolo27) Newsgroups: comp.lang.ada Subject: Re: procedure and generic package Date: 21 Nov 2003 09:55:00 -0800 Organization: http://groups.google.com Message-ID: <92bfc3dd.0311210955.1d65f893@posting.google.com> References: <92bfc3dd.0311201234.6d706aa6@posting.google.com> NNTP-Posting-Host: 217.132.89.237 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1069437301 15942 127.0.0.1 (21 Nov 2003 17:55:01 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 21 Nov 2003 17:55:01 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:2824 Date: 2003-11-21T09:55:00-08:00 List-Id: "David C. Hoos" wrote in message news:... > It's pretty obvious what's wrong. What did your compiler tell you? > > "lolo27" 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