[comp.text.tex] Testing for empty arguments

dje@lanl.gov (debi erpenbeck) (05/02/91)

I've been trying (unsuccessfully) to get the following code to print
"Arg1 is empty". Can someone tell me how to do this?

\def\macro#1#2{%
\ifcat#1=\empty
	\message{Arg1 is empty}%
\else
	\message{Arg1 is not empty}%
\fi
}

\macro{}{}
\bye

\ifx#1=\empty
\if#1=\empty
\ifcat#1=\empty