Conditional Operators

Conditional operators allow text to be inserted that depends on the value in a macro. Conditional operators are never used in rules, but are often used in header definitions (see ยง31.6).

$?macro result $| alternate$.

If the macro has a value, the entire expression is replaced by result. Otherwise, the entire expression is replaced by alternate. For example:

From: $?x$x <$g>$|$g$.

Here, if $x has a value (the $?x), the entire expression becomes:

From: $x <$g>

Otherwise (the $|$g), it becomes:

From: $g

The $. is last and terminates the conditional expression. Conditional expressions may nest, but nesting is discouraged.