[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.9 Conditionals and loops

There are three different builtin conditionals in T4.

The first is \ifelse. It takes four arguments:

 
\ifelse{string-1}{string-2}{then}{else}

If string-1 and string-2 are equal (character for character), it expands to then, otherwise it expands to else.

The second is \ifelsex.

 
\ifelsex{string-1}{string-2}{then}{else}

Unlike \ifelse is not to expand string-1 even when it is a macro, \ifelsex first expands string-1, and then tests with string-2.

The third is \ifdef.

 
\ifdef{macro-name}{then}{else}

It checks whether there is a macro named macro-name, if so, it expands to then, otherwise it expands to else.



This document was generated on February, 23 2003 using texi2html