Servertec | if then-elseif then-else-end | |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Used to conditionally execute a block of statements when some expression evaluates to true and another block of statements when the expressions are false. Syntaxif expression then{ statement }... [ elseif expression then { statement }... ]... else { statement }... end Notesexpression the expression to evaluate.statement any statements to process. Example
unitCost = totalAmount / quantity print( "Unit Cost: " + unitCost ) elseif quantity = 0 then print( "0 items ordered" ) else print( quantity + " is not a valid quantity" ) end |
|
top of page
|