NPR puzzle
Mark Wieder
mwieder at ahsoftware.net
Fri Jul 22 11:31:00 EDT 2005
Brian-
Thursday, July 21, 2005, 8:43:43 PM, you wrote:
BY> Well, to be fair, even a strongly-typed language like C lets you do the
BY> same sort of things.
BY> false is frequently defined as "everything other than true".
BY> if/else is usually interpreted as "if TRUE then do this, OTHERWISE do
BY> this", not "if TRUE then do this, if FALSE do this".
By that reasoning, anything not TRUE is FALSE. Carried to its logical
conclusion,
on mouseUp
local xyz
put 1234 into xyz
if xyz is false then
put "xyz evaluates to FALSE"
else
put "xyz evaluates to TRUE"
end if
end mouseUp
should provide "FALSE", since 1234 isn't FALSE. Obviously this doesn't
happen. There's nothing you can put into xyz other than "false" that
will evaluate to FALSE.
--
-Mark Wieder
mwieder at ahsoftware.net
More information about the use-livecode
mailing list