AutoGen - The Automated Program Generator: 3.6.14 IF - Conditionally Emit a Template Block

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

### 3.6.14 IF - Conditionally Emit a Template Block

Conditional block. Its arguments are evaluated (see section EXPR - Evaluate and emit an Expression) and if the result is non-zero or a string with one or more bytes, then the condition is true and the text from that point until a matched `ELIF`, `ELSE` or `ENDIF` is emitted. `ELIF` introduces a conditional alternative if the `IF` clause evaluated FALSE and `ELSE` introduces an unconditional alternative.

    [+IF <full-expression> +]
    emit things that are for the true condition[+

    ELIF <full-expression-2> +]
    emit things that are true maybe[+

    ELSE "This may be a comment" +]
    emit this if all but else fails[+

    ENDIF "This may *also* be a comment" +]

`<full-expression>` may be any expression described in the `EXPR` expression function, including the use of apply-codes and value-names. If the expression yields an empty string, it is interpreted as false.

This document was generated by Bruce Korb on December, 17 2006 using texi2html 1.76.