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=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!nike!ucbcad!ucbvax!LLL-ICDC.ARPA!pearson%anchor.DECnet From: pearson%anchor.DECnet@LLL-ICDC.ARPA ("ANCHOR::PEARSON") Newsgroups: net.lang.ada Subject: Re: Entries as formal parameters in generic packages. Message-ID: <8607082124.AA21127@ucbvax.Berkeley.EDU> Date: Thu, 3-Jul-86 12:01:00 EDT Article-I.D.: ucbvax.8607082124.AA21127 Posted: Thu Jul 3 12:01:00 1986 Date-Received: Wed, 9-Jul-86 03:26:03 EDT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: "ANCHOR::PEARSON" Organization: The ARPA Internet List-Id: For what it's worth, VAX Ada allows an entry name to be "withed" as a formal procedure in a generic package (see example below). I don't know whether this is permitted or encouraged by the Ada language, but the fact that DEC did it lends support to the notion that it's possible. - Peter. (pearson%anchor.decnet@lll-icdc.arpa) ---------------------------------------------------------------------- generic with procedure Maybe_an_Entry( s : in string ) ; package Temp_GP is procedure Call_It( s2 : in string ); end Temp_GP; package body Temp_GP is procedure Call_It( s2 : in string ) is begin Maybe_an_Entry( "is " & s2 ); end Call_It; end Temp_GP; with text_io; use text_io; with Temp_GP; procedure temp_proc is task T is entry Task_Entry( s : in string ); end T; package P is new Temp_GP( T.Task_Entry ); task body T is begin accept Task_Entry( s : in string ) do put_line( "The password " & s ); end; end T; begin P.Call_It( "Swordfish" ); end temp_proc; ------