optional arguments



hi bob,

> Thanks Richard and Chris, I have managed to produce the behaviour I am
> looking for but am wondering whether this could have been done in a more
> efficient manner:

buildq, with splice, can help here. something like

 my_plot (foo, bar, [extra]) ::=  /* <-- note ::= instead of := here */
   buildq ([foo, bar, extra], plot2d (foo, bar, splice (extra)));

buildq = create code snippet, buildq within "::=" = create and evaluate snippet.

splice (extra) => copy elements of extra into arguments of plot2d;
if extra = [] (i.e. no extra arguments) then no effect (i.e. doesn't complain).

hth
robert dodier