John,

>Thanks Josh!  That is awesome - i like clean simple code ( getting spoiled
>with javascript as I dive deeper into that language lol )
>
>>I just did a test and this works:
>>
>>#Int(not 0)# returns 1
>>#Int(not 1)# returns 0

If you're truly wanting a bitwise NOT operator (and not the logical NOT
operator--as you seem to be implying,) I think it's dangerous to write code
where you're using NOT and expecting it to perform as the BitNot() function:

http://www.cfquickdocs.com/?getDoc=BitNot

I would absolutely use the BitNot() function in this case. The problem with
the above code is:

#int(not 255)# = 0
#bitNot(255)# = -256

Also, a bitwise NOT operator would actually return:

#bitNot(0)# = -1
#bitNot(1)# = -2

So you maybe after a logical NOT operator in your case anyway.

-Dan


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:289710
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to