lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sat, Jun 25, 2011 at 6:18 PM, Xavier Wang <weasley.wx@gmail.com> wrote:
> Sorry, but I mean, a new version of assert against the baselib one that
> _don't_ evaluate the second expression if the first expression is true.

That is difficult because assert() is a function, not a macro like in C.

It's a pity that expressions cannot be statements, e.g. the expression

1 == 0 or error_fn()

works as we want: error_fn() is only called if the first condition fails.

steve d.