Servertec | if then-elseif then-end | |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Used to conditionally execute a block of statements when some expression evaluates to true. Syntaxif expression then{ statement }... [ elseif expression then { 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" ) elseif quantity < 0 then print( quantity + " is not a valid quantity" ) end |
|
top of page
|