Re: "or" shortcut does not work - but why?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: "or" shortcut does not work - but why?
- From: Nick Gammon <nick@...>
- Date: 2007年6月17日 07:19:33 +1000
On 16/06/2007, at 9:20 PM, Andreas Rozek wrote:
local Result = false; -- you could also use "nil" here
Result = Result or "anything else";
io.stdout:write("Result = '"..tostring(Result).."'");
What if you write:
local Result = false; -- you could also use "nil" here
io.stdout:write("Result = '"..tostring(Result).."'");
The "or" seems to work from your post, so maybe it is not making the
local variable correctly.
- Nick