Ralf Hemmecke wrote:
>
> Well, if it were Aldor, you would have "keyword arguments".
> See Section 6.3 of http://www.aldor.org/docs/aldorug.pdf .
> I don't think that works in SPAD (yet).
AFAIK this is quite different that Lisp "keyword arguments":
in particular in Lisp everything is done at runtime. I do
not think this Aldor construct would help calling Lisp
routines (of course re-coding Lisp routines in Aldor is
easier due to this construct).
> However, what does the underlying GSL actually do? Do they allow
> optional parameters? Or have they different function(name)s?
AFAIK GSL has interface in C. In C in principle one can use
"varags" functions to have arbitarily messy untyped interface.
But normal practice is to have fixed argument list with specified
types. Normal practice in C is to use special values or extra
flag arguments. For example error of 0 may mean default value.
Or extra argument which says if requested error is absolute
or relative. AFAICS the whole multiple values and keyword
business comes entirely from Lisp wrappers. I would guess
that C code takes pointer to memory location where it can
store error estimate and number of steps. Usual convention
is that null pointer means that corresponding value is not
needed. In C one can also return a structure, but this is
less usual.
--
Waldek Hebisch
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.