if语句

if语句用于条件判断,if语句有三种形式:

if conditions then
    thenpart
end

if conditions then
    thenpart
else
    elsepart
end

if conditions then
    thenpart
elseif conditions then          -- 可以有多个elseif语句块
    elseifpart
else
    elsepart
end

results matching ""

    No results matching ""