if Command

if Basic Command

               if exp ... [else ...] end
As a basic command, the if command provides conditional execution of embedded Jive commands. if is followed by an expression that is converted to bool. If the result is true, the Jive commands that follow are executed up to an end or else. If the expression result is false, the immediately following Jive commands are skipped. If an optional else is included before the end, the Jive commands that follow are executed when the expression is false and skipped otherwise. For example,
if count count else 'No' end
which outputs value of count if it is non-zero and 'No' otherwise.

if External Command

               {if exp} ... [{else} ...] {end}
As an external command, the if command provides conditional inclusion of HTML text. The if is preceded by a left brace ({). It is followed by an expression that is converted to bool. The expression must be followed by a right brace (}) to identify this as an external command. If the result of the expression is true, the HTML text (and embedded Jive code) that follows is included up to a {end} or {else}. If the expression result is false, the immediately following HTML text is skipped. If an optional {else} is included before the {end}, the HTML text that follows is included when the expression is false and skipped otherwise. For example,
{if count}{count}{else}No{end}
which outputs value of count if it is non-zero and 'No' otherwise.
[Return to Previous Page] [Return to Main Page]
Jive(tm) 2, Copyright © 1997 FFE Software All Rights Reserved WorldWide