|
From: Kostas O. <ko...@re...> - 2016-04-21 13:31:23
|
Thanks, I will look into it.
Kostas
On 04/20/2016 16:52, Arthur Norman wrote:
> On Wed, 20 Apr 2016, Kostas Oikonomou wrote:
>
>> Is there some way to have Reduce procedures have optional
>> arguments/parameters, or arguments/parameters with default values?
>> Right now I have to declare all such variables global in my user-mode
>> Reduce program.
>>
>> Kostas
>>
> Standard Lisp does not provide optional arguments or default values as a
> capability, so at that level of abstraction the answer is no.
> Apart from the fact that a Lisp-level macro definition can cope...
> But at the level of the algebraic interface that the ordinary user works
> with then observe commands like for instance "plot" or even "df" that can
> take variable numbers or arguments, as can a whole bunch of other things,
> so it how you set up the way that something will get simplified. If you go
> put('myname, 'simpfn, 'simpmyname)
> then when the user goes myname(... args ...) the function simpmyname gets
> a list of all of the args, so you can check its length and do whatever you
> like...
>
> Arthur
>
|