At 00:04 22/09/2003 +0900, you wrote:

\newcount\MyCounter
\define[1]\MyMacro{
   \global\advance\MyCounter by 1 \relax
   \number\MyCounter #1}

\starttext
\MyMacro{Hello}
\MyMacro{Goodbye}
\MyMacro{Hello again}
\stoptext
--> 1Hello 2Goodbye 3Hello again

or, using pseudo counters:


\define[1]\MyMacro
  {\doglobal\increment\MyCounter
   \MyCounter#1}

or even

\define\MyCounter{\doglobal\increment\MyCounter\MyCounter}

Hans
-------------------------------------------------------------------------
                                  Hans Hagen | PRAGMA ADE | [EMAIL PROTECTED]
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                       information: http://www.pragma-ade.com/roadmap.pdf
                    documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

_______________________________________________
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to