htp on-line reference: IF, NOT, ELSE, /IF


<IF (NOT) conditional>
    block #1
    block #2


IF, NOT, 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:

    <IF name="Jim">

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

    <IF name>

If the NOT tag is present in the IF markup, the evaluation of the conditional is reversed.

The ELSE operator is optional. The ELSE block is always included in the output if the IF operation evaluated false. Otherwise, it is ignored.

A conditional block must be closed with the /IF tag.

Table of Contents

htp on-line reference /
Author: Jim Nelson / No email available
Maintainer: Robert King /

Copyright © 1995-96 Jim Nelson.
Permission to reproduce and distribute this hypertext document granted according to terms described in the Introduction

Last updated Mon Sep 23, 1996