diff options
author | David Walter Seikel | 2012-01-18 23:33:27 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-18 23:33:27 +1000 |
commit | 0bcf53e06efc687115c096ff9cadc41316eb95cf (patch) | |
tree | 17c9a2e5071fb57830312b51f33170f658546bfd /LuaSL | |
parent | Make sure allocated memory is all initialized properly. (diff) | |
download | SledjHamr-0bcf53e06efc687115c096ff9cadc41316eb95cf.zip SledjHamr-0bcf53e06efc687115c096ff9cadc41316eb95cf.tar.gz SledjHamr-0bcf53e06efc687115c096ff9cadc41316eb95cf.tar.bz2 SledjHamr-0bcf53e06efc687115c096ff9cadc41316eb95cf.tar.xz |
Add a note about Lua truth values.
Diffstat (limited to 'LuaSL')
-rw-r--r-- | LuaSL/src/LuaSL_compile.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c index 3dea80c..b9d6d48 100644 --- a/LuaSL/src/LuaSL_compile.c +++ b/LuaSL/src/LuaSL_compile.c | |||
@@ -671,6 +671,7 @@ QUIRK - I have seen cases where a double explicit typecast was needed in SL, but | |||
671 | Any binary operation involving a float and an integer implicitly casts the integer to float. | 671 | Any binary operation involving a float and an integer implicitly casts the integer to float. |
672 | 672 | ||
673 | A boolean operation deals with TRUE (1) and FALSE (0). Any non zero value is a TRUE (generally sigh). | 673 | A boolean operation deals with TRUE (1) and FALSE (0). Any non zero value is a TRUE (generally sigh). |
674 | On the other hand, in Lua, only false and nil are false, everything else is true. | ||
674 | Bitwise operations only apply to integers. The shifts are arithmatic, not logical. Right shifted bits are dropped, left shifts the sign bit. | 675 | Bitwise operations only apply to integers. The shifts are arithmatic, not logical. Right shifted bits are dropped, left shifts the sign bit. |
675 | 676 | ||
676 | integer = integer0 % integer1; // Apparently only applies to integers, but works fine on floats in OS. | 677 | integer = integer0 % integer1; // Apparently only applies to integers, but works fine on floats in OS. |