From: Jeffrey Carter <spam@spam.com>
Subject: Re: Newbie question:procedural variables(call by reference)?
Date: Mon, 15 Sep 2003 18:56:53 GMT
Date: 2003-09-15T18:56:53+00:00 [thread overview]
Message-ID: <VXn9b.4841$BS5.4384@newsread4.news.pas.earthlink.net> (raw)
In-Reply-To: <3F65EBF4.7CF3@mail.ru>
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
next prev parent reply other threads:[~2003-09-15 18:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-15 16:42 Newbie question:procedural variables(call by reference)? Dmytry Lavrov
2003-09-15 18:20 ` Stephen Leake
2003-09-15 18:50 ` Gautier Write-only
2003-09-15 18:56 ` Jeffrey Carter [this message]
2003-09-16 10:45 ` Georg Bauhaus
2003-09-15 23:22 ` Matthew Heaney
2003-09-18 9:06 ` Dmytry Lavrov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox