Cool, to be honest, ive never really seen -1 as true, thanks though....after
all these years its good to know.



   _____  

From: Joe Rinehart [mailto:[EMAIL PROTECTED]
Sent: 19 August 2004 14:53
To: CF-Talk
Subject: Re: Double Negative way of making decisions? Good?

Hey Neil,

-1 is boolean for true in CF (and in most languages I've dealt with),
therefore doing the boolean test "not compare()" is a valid boolean
comparison for all three results of compare().

-joe

----- Original Message -----
From: Robertson-Ravo, Neil (RX) <[EMAIL PROTECTED]>
Date: Thu, 19 Aug 2004 14:43:40 +0100
Subject: RE: Double Negative way of making decisions?  Good?
To: CF-Talk <[EMAIL PROTECTED]>

This not what I am saying...

0 = False

Not 0 = True

Not 1 = False

What I am saying is that Compare() can yield 3 return values....-1,1 or 0
and by saying <cfif NOT Compare(..)> you are checking for a Boolean value...
-1 is not Boolean.

    _____  

From: Claude Schneegans [mailto:[EMAIL PROTECTED]
Sent: 19 August 2004 13:19
To: CF-Talk
Subject: Re: Double Negative way of making decisions? Good?

>>Compare can return -1,0 or 1 which is not Boolean.

In almost any language, 0 is false and not 0 is true, boolean or not.
Even in C which is strongly typed.
--
_______________________________________
REUSE CODE! Use custom tags;
See 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] [Donations and Support]

Reply via email to