if (conditon) then --action #1 elseif (condition) then --action #2 else --action #3 end if op == "+" then r = a + b elseif op == "-" then r = a - b elseif op == "*" then r = a*b elseif op == "/" then r = a/b else error("invalid operation") end if bool then --code else --code endif condition_1 then statement_1 elseif condition_2 then statement_2 else statement_3 end-- if-then if a < 0 then a = 0 end -- if-then-else if a < b then return a else return b end -- if-then-elseif-then-else if a < 0 then x = 0 elseif a > 1 then x = 1 else x = a end