The else Statement
Syntax
if <condition> {
[ statements ]
}
else {
[ statements ]
}
An if statement can have an else or
elsif clause. If the condition evaluates to
false, the statements in the if subsection are
skipped and the statements within the else subsection are executed.
When a dynamic expansion fails, and
if statement is followed by a trailing else or
elsif statement, then if
condition is treated as "false", and the else or `elsif statement is
processed.
Otherwise, the failed if statement returns the fail
rcode, which is processed according to
the rules for the current section.
Example
if (User-Name == "bob") {
reject
}
else {
ok
}
The last entry in an else section can also be an actions subsection.