local x = -1

-- like c++
-- string sign = (x < 0) ? “ negative” : “non-negative”
local sign = x < 0 and 'negative' or 'non-negative'
print('x is ' .. sign)


-- 也可以嵌入進print裡面
print('x is ' .. (x < 0 and 'negative' or  'non-negative'))