ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* getcommalistsize
@ 2006-01-22 12:56 Hans van der Meer
  2006-01-22 17:06 ` getcommalistsize Taco Hoekwater
  0 siblings, 1 reply; 3+ messages in thread
From: Hans van der Meer @ 2006-01-22 12:56 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: getcommalistsize
  2006-01-22 12:56 getcommalistsize Hans van der Meer
@ 2006-01-22 17:06 ` Taco Hoekwater
  2006-01-22 20:36   ` getcommalistsize Hans van der Meer
  0 siblings, 1 reply; 3+ messages in thread
From: Taco Hoekwater @ 2006-01-22 17:06 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: getcommalistsize
  2006-01-22 17:06 ` getcommalistsize Taco Hoekwater
@ 2006-01-22 20:36   ` Hans van der Meer
  0 siblings, 0 replies; 3+ messages in thread
From: Hans van der Meer @ 2006-01-22 20:36 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-01-22 20:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-22 12:56 getcommalistsize Hans van der Meer
2006-01-22 17:06 ` getcommalistsize Taco Hoekwater
2006-01-22 20:36   ` getcommalistsize Hans van der Meer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).