标准写法

控制流 / 条件语句 / if/else 语句

local latitude = -42

-- Checked top down: the first true branch runs
local location
if latitude == 0 then
  location = "Equator"
elseif latitude < 0 then
  location = "Southern Hemisphere"
else
  location = "Northern Hemisphere"
end
-- location = Southern Hemisphere

print("location = " .. location)