I wanted to do something with the length of a commalist but found that it macro \getcommalistsize does not seem to respond. Here is a small test: \starttext \def\showcommalist#1{commalist=(#1)\crlf (size=\getcommalistsize[#1])\crlf \processcommalist[#1]\showcommalistitem\crlf (commalistsize=\commalistsize)\par} \def\showcommalistitem#1{item = #1 } \showcommalist{a,b,c,d,e} \showcommalist{1,2,3} direct call (size=\getcommalistsize[p,q]) \stoptext result: commalist=(a,b,c,d,e) (size=) item = a item = b item = c item = d item = e (commalistsize=5) commalist=(1,2,3) (size=) item = 1 item = 2 item = 3 (commalistsize=3) direct call (size=) As can be seen the macro \getcommalistsize does not give a value back, \processcommalist works. Am I doing something wrong here or understood it wrong? yours sincerely, dr. H. van der Meer
Hans van der Meer wrote:
As can be seen the macro \getcommalistsize does not give a value back, \processcommalist works. Am I doing something wrong here or understood it wrong?
\getcommalistsize puts its result (the length of the commalist) in \commalistsize, but does not expand to anything, so using "direct call"s does not work. Cheers, Taco
Thanks, I was right in suspecting I did not completely understand the effect of \getcommalistsize. It is clear now. yours sincerely, dr. H. van der Meer On Jan 22, 2006, at 18:06, Taco Hoekwater wrote:
Hans van der Meer wrote:
As can be seen the macro \getcommalistsize does not give a value back, \processcommalist works. Am I doing something wrong here or understood it wrong?
\getcommalistsize puts its result (the length of the commalist) in \commalistsize, but does not expand to anything, so using "direct call"s does not work.
Cheers, Taco _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
participants (2)
-
Hans van der Meer
-
Taco Hoekwater