[Tugindia] clarification on edef

David Kastrup tugindia@tug.org
10 Jan 2003 14:06:17 +0100


David Kastrup <dak@gnu.org> writes:

> "Baskaran.K" <baskaran@sps.co.in> writes:
> 
> > \newcount\aacount
> > \def\kk{}
> > \def\aa#1{\advance\aacount 1\ifnum\aacount=0\edef\kk{ \kk #1}
> > \else\edef\kk{ \kk, #1}\fi}
> > \aa{aa}
> > \aa{bb}
> > \aa{cc}
> > \aa{dd}
> > \kk
> > if you find any other good method, Kindly help me.
> 
> \def\kk{}
> \def\aa#1{\edef\kk{\kk\ifx\kk\empty , \fi #1}}

Oops, I mean
\def\aa#1{\edef\kk{\kk\ifx\kk\empty\else , \fi#1}}

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum