(eplain.info)\ifempty


Next: \ifinteger and \isinteger Prev: \ifundefined Up: Expansion
Enter node , (file) or (file)node

7.6.7 '\ifempty'
----------------

'\ifempty{ARG} T \else F \fi' expands the T text if ARG is the empty
string, and the F text otherwise. This macro is useful when you need to
test for empty arguments to your macros, for example:

     \def\foo#1{\ifempty{#1} T \else F \fi}

   Since '\ifempty' is not a primitive conditional, it cannot be used in
places where TeX might skip tokens "at high speed", e.g., within another
conditional--TeX can't match up the '\if''s and '\fi''s.

   Note that the following code

     \def\empty{}
     \ifempty\empty\message{empty}\else\message{not empty}\fi

will produce the message 'not empty'.


automatically generated by info2www version 1.2.2.9