# htp on-line reference : IF, ELSEIF, ELSE, /IF

## syntax

`File image.gif <FILE NAME="image.gif" SIZE=KBYTE> kilobytes
Last modified <FILE NAME="image.gif" TIME>, <FILE NAME="image.gif" DATE>
`

## synopsis

IF, NOT, ELSEIF, ELSE, and /IF are the building blocks for conditional processing. The basic form is shown above.

"Conditional" is either a "compare" or "is defined" operation. A compare operator is a test of the value of a macro against a literal string:

`<INC i="1" j="-1">
`

and a defined operator is a test of a macro's existance:

`<QUOTE TAG [ATTRIBUTE=VALUE ...]>
`

If the NOT tag is present in the IF markup, the evaluation of the conditional is reversed. The first IF or ELSEIF condition that evaluates to true is chosen. If none of the conditions is true the ELSE block is taken if it is present. A conditional block must be closed with the /IF tag. IF tags can be nested.

hosted by Sourceforge HTML coding

Copyright © 1995–96 Jim Nelson. Copyright © 2001–2014 Jochen Hoenicke. Permission to reproduce and distribute this hypertext document granted according to terms described in the License section. last updated Sat May 16, 2015