# [Tugindia] clarification on edef

Fri, 10 Jan 2003 11:54:02 +0530

Dear sir,

I found out solution by the following way

\newcount\aacount
\def\kk{}
\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.

Regards

-----Original Message-----
Sent: Friday, January 10, 2003 9:47 AM
To: 'tugindia@tug.org'
Subject: [Tugindia] clarification on edef

Dear sirs,

I need some clarification. Kindly help me.

For example:

\def\kk{lllll}
\def\aa#1{\edef\kk{\kk#1,}}
\aa{aa}
\aa{bb}
\aa{cc}
\aa{dd}

\kk===>output is  llll,aa,bb,cc,dd,''

I wish to remove the last comma; the out put must be  llll,aa,bb,cc,dd''
The input of \aa  repeated several times (not fixed times). We could not
modify the input \aa''. How to remove the
last puncutation , or add new punctuation in last position.

Regards