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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,15ce2ff6360d2b58 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-15 11:56:54 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!logbridge.uoregon.edu!canoe.uoregon.edu!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread4.news.pas.earthlink.net.POSTED!not-for-mail From: Jeffrey Carter Organization: jrcarter commercial-at acm [period | full stop] org User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Newbie question:procedural variables(call by reference)? References: <3F65EBF4.7CF3@mail.ru> In-Reply-To: <3F65EBF4.7CF3@mail.ru> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Mon, 15 Sep 2003 18:56:53 GMT NNTP-Posting-Host: 63.184.104.173 X-Complaints-To: abuse@earthlink.net X-Trace: newsread4.news.pas.earthlink.net 1063652213 63.184.104.173 (Mon, 15 Sep 2003 11:56:53 PDT) NNTP-Posting-Date: Mon, 15 Sep 2003 11:56:53 PDT Xref: archiver1.google.com comp.lang.ada:42541 Date: 2003-09-15T18:56:53+00:00 List-Id: Dmytry Lavrov wrote: > There are no procedural variables(calls by reference) in ADA,right?(or i > missed something...). > How to live without 'em? (i guess , 'like in java' ;-) > > What for example if i have wrote,say.... expression evaluator. > In Pascal(bit extended), > and with way to add custom functions,like > > procedure > AddFunc(name:string;numparams:integer;additionalparam:mashine_word;fn:CustomFunction); This is called access-to-subprogram in Ada; see ARM 3.10. You'd want something like type Custom_Function is access function (...) return Whatever; procedure Add_Func (Name : in String; Num_Params : in Natural; Additional_Params : in Machine_Word; Func : in Custom_Function); Note, however, the restrictions on nesting. -- Jeff Carter "Mr. President, we must not allow a mine-shaft gap!" Dr. Strangelove 33