On 4/16/2013 11:10 AM, Thomas A. Schmitz wrote:
On 04/16/2013 11:05 AM, Marco Patzer wrote:
It doesn't make sense to use named parameters with \define, since you explicitly pass the parameter*number* in brackets. You cannot refer to a number by name. Well, you could theoretically, but I'd strongly object.
Just out of curiosity: why would you object? In Lua, we have the syntax
function whatever(one, two, three) do something with(one, two, three) end
I'm not lobbying for define to have something similar, I just want to point out that it would be in the spirit of convergence between ConTeXt and Lua. It certainly isn't an urgent need, but having
\define[one,two,three]
wouldn't be absurd, now would it?
there is a commented blob that implements thinsg like this \starttext \define[2]\whatevera{#1+#2} \whatevera{A}{B} \define[me][too][2]\whateverb{#1+#2+#3+#4} \whateverb[A]{B}{C} \whateverb[A][B]{C}{D} \define[alpha][beta][gamma][delta]\whateverc{#1+#2+#3+#4} \whateverc[P][Q] \stoptext but it's just an old idea. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------