!--a11y-->
Purpose
Performs conditional substitutions on an HTMLBusiness expression.
Syntax
if (
expression) statementDescription
The
if statement allows you to perform conditional substitution in your HTML document.The
if statement in HTML Business is similar to the syntax and semantics of other common programming languages such as C and JavaScript. Since nesting is possible, if statements can contain other if statements. The same embedding is also allowed for the repeat statement.The keywords
elsif and elseif can be used as alternatives.Examples
In the syntax description, the term
expression refers to any expression that evaluates to a truth value, that is, to 0 (FALSE) for conditions not met, or not equal to 0 (TRUE) for conditions met.The following are examples of this kind of expression:
vbcom-kunde >= 1000
vbcom-kunde
j % 3 == 0
j / (4 - 1) != a * (b + (c + 2))
s == "Walter" & " " & "Weissmann"
(x > 2 && x <99) || (s > "abc")
The following are examples of
if statements:Example 1:
`if (vbcom-kunde) vbcom-kunde else` Undefined Customer Number `end`
Example 2:
`if (j % 3 == 0)` <TR> `else` <TD> `end`
Example 3:
`if (1)
write("This branch is always true!")
elsif (0)
write("This branch is never true!")
else
write("The impossible occurred!")
end`
Example 4:
`if (x > 0 && x < 100)`

The operators
< , <= , > and >= are not defined for character strings. If you use them with character strings, the strings are automatically converted into numerical values.