NPR puzzle

Mark Wieder mwieder at ahsoftware.net
Fri Jul 22 14:05:13 EDT 2005


Eric-

Friday, July 22, 2005, 8:40:53 AM, you wrote:

EC> Strictly speaking, anything "not TRUE" is "FALSE" is correct:

EC> on mouseUp
EC>    local xyz
EC>    put 1234 into xyz
EC>    if not xyz then put false
EC>    else put true
EC> end mouseUp

EC> And you tried anything "FALSE" is "not TRUE" :-)

Right. The point being that "if not xyz" is not the same as "if xyz is
false". It's not really correct that "anything not TRUE is FALSE",
it's simply that anything not TRUE fails the "is true" test. Anything
not "true" is "not true".

Therefore, testing to see is something is false will not necessarily
return the correct answer, i.e., will not determine whether something
is true or false in boolean terms, but rather whether it is strictly
equal to the value "false".

-- 
-Mark Wieder
 mwieder at ahsoftware.net




More information about the use-livecode mailing list