See the book ProgrammingInLua? or ExpressionsTutorial for details on the special properties of these binary operators that allow them to work this way.
print('x is ' .. (x < 0 and 'negative' or 'non-negative')) -- this works!

[ ]
 

Leave a Reply

*