[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Is everything an expression?
- From: steve donovan <steve.j.donovan@...>
- Date: Sat, 7 Sep 2013 19:06:58 +0200
On Sat, Sep 7, 2013 at 5:17 PM, Jerome Vuarand <email@example.com> wrote:
It seems one of those feature requests that pop up occaisionally, see
But about the if statement: the Lua Way is to write this so
local res = (a > 2) and x or y
which works because and/or return the matching value, not just a boolean.
(there is a problem if x were actually 'false')