lua-users home
lua-l archive

Re: "or" shortcut does not work - but why?

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


On 16-Jun-07, at 10:26 AM, Luiz Henrique de Figueiredo wrote:
 local Result = false; -- you could also use "nil" here
 Result = Result or "anything else";
 io.stdout:write("Result = '"..tostring(Result).."'");
yields "false" (or "nil", resp.) rather than "anything else"
Perhaps this is related to this bug, which apparently only surfaces in
Windows: http://www.lua.org/bugs.html#5.1.2-2
It would be useful to see the byte code which results from that
script, if luac has also been ported.

AltStyle によって変換されたページ (->オリジナル) /