[NTG-context] getcommalistsize

Hans van der Meer hansm at science.uva.nl
Sun Jan 22 13:56:58 CET 2006


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





More information about the ntg-context mailing list