[metapost] variable parameter list
Stephan Hennig
mailing_list at arcor.de
Fri Feb 10 12:32:33 CET 2006
Jens-Uwe Morawski schrieb:
> def processKeyvals (text _kvps_)=
Great! Will CTAN ever see this piece of code? Since I do not completely
understand what's going on here I'd like to ask some additional
questions regarding the code.
> begingroup;
> save _equals, _assign ;
> let _equals= = ;
Is it true that there would be no need to save '=' (for the final for
loop) if one chose another assignment character in keyval syntax, e.g.,
a colon? (Since this perfectly works there's no need for changing that.)
> primarydef _ll_ _assign _rr_ =
> hide(_ll_ _equals _rr_ ) 1
An arbitrary return value (zero or -1) would work here as well?
> enddef;
>
> save = ;
> let = _equals _assign ;
What is the difference in '=' before and after these changes? As I
understand it '=' refers to _assign which in turn refers to _equals
which is the same as '='.
> for _xx_ _equals _kvps_ : endfor ;% NOP
^^^
Hardly. :)
> endgroup;
> enddef;
> end
Regards,
Stephan Hennig
More information about the metapost
mailing list