Well... your right that it is part of using a loosely typed language, this implies that the language has to convert automatcally variables and expressions in order to perform a statement, but when the laguage converts to the wrong type, IT IS definitely a bug, loosely type or not.
in true and (4*5), CF should have converted (4*5) to true and not true to 1, since the operator is boolean.
IMHO this comes from the fact that logical expressions are evaluated only until the final result is known.
The rest of the problem comes from the propery of CF to interpret and guess the type of expressions and variables.
In (false and (4*5)), the result false is known as soon as AND is encountered, so the rest of the _expression_ is
not evaluated. At this time, CF is considering a boolean constant, and it returns a boolean value.
In the case of (true and (4*5)), CF has to evaluate (4*5), but then, since 4*5 is a numerical operation, it
converts true to numeric instead of the reverse.
Just my 2 � explanation, and it is definitely a bug.
--
_______________________________________
See some cool custom tags here:
http://www.contentbox.com/claude/customtags/tagstore.cfm
Please send any spam to this address: [EMAIL PROTECTED]
Thanks.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

