[NTG-context] checking for an undefined constant

2010-06-25 Thread Vyatcheslav Yatskovsky
Hi, Now I check for an undefined constant like this: \ifx \Homeworks \undefined \else Home works -- {\Homeworks} \fi The useful part is in else clause. How to swap this check so that else is not needed? Rgrds, Vyatcheslav

Re: [NTG-context] checking for an undefined constant

2010-06-25 Thread Aditya Mahajan
On Fri, 25 Jun 2010, Vyatcheslav Yatskovsky wrote: Hi, Now I check for an undefined constant like this: \ifx \Homeworks \undefined \else Home works -- {\Homeworks} \fi The useful part is in else clause. How to swap this check so that else is not needed? From syst-gen.mkii %D \macros %D

Re: [NTG-context] checking for an undefined constant

2010-06-25 Thread Wolfgang Schuster
Am 25.06.10 15:39, schrieb Aditya Mahajan: On Fri, 25 Jun 2010, Vyatcheslav Yatskovsky wrote: Hi, Now I check for an undefined constant like this: \ifx \Homeworks \undefined \else Home works -- {\Homeworks} \fi The useful part is in else clause. How to swap this check so that else is not

Re: [NTG-context] checking for an undefined constant

2010-06-25 Thread Vyatcheslav Yatskovsky
Thank you all for such a variety of solutions! Gonna look into it. )) %D \macros %D {doifundefined,doifdefined, %Ddoifundefinedelse,doifdefinedelse, %Ddoifalldefinedelse} %D %D The standard way of testing if a macro is defined is %D comparing its meaning with another undefined one,