[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: "or" shortcut does not work - but why?
- From: Andreas Rozek <Rozek@...>
- Date: Sat, 16 Jun 2007 13:20:51 +0200
Hello!
Yesterday, I have ported Lua 5.1.2 to Windows CE Handheld PC
2000 using embedded Visual Tools 3.0. My port uses the same
approach as Lua-5.1-CE by "goodtaste", but implements a few
more system functions (I even plan to implement "system" and
perhaps _popen/_pclose as I need that functionality)
The result works like a charm (which is astonishing) with
one strange exception:
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"
If I change the second line to
Result = false or "anything else";
then I get the expected output. I already tried to track the
VM's behaviour in order to isolate the problem - but then de-
cided to better ask the list first ;-)
Do you have any idea what might go wrong?
Thanks in advance for any help!
Kind regards,
Andreas Rozek Phone: ++49 (7031) 436 5784
Brunnenstraße 30/2 Mobile: ++49 (151) 172 879 18
D-71032 Böblingen EMail: Andreas.Rozek@gmx.de
Germany URL: http://www.Andreas-Rozek.de