Just as a sidenote, some of us were trained in languages where integersare
often used in the place of booleans.
For example, my first computer science class in college was taught in a
language called Scheme (a variant of LISP) which IIRC had no typed boolean.
So we all learned that "not false is true enough" meaning that for a given
variable type, there was one and only one defined value that was false, and
anything else was true.
While this doesn't always hold true, it does in a good many popular
languages.
The long and the short of it is that I read "not zero" as true and "zero" as
false.
In the long run, I think we can put this in the "personal preference"
file -- at least until MM breaks the standard on how they interpret integers
in a boolean evaluation.
--Ben Doom
Programmer & General Lackey
Moonbow Software
: -----Original Message-----
: From: Jeffry Houser [mailto:jeff@;farcryfly.com]
: Sent: Monday, November 11, 2002 9:09 AM
: To: CF-Talk
: Subject: RE: Booleans
:
:
: At 02:01 PM 11/11/2002 +0000, you wrote:
: >I think they are both 'as readable'
: >
: >this :
: >
: ><cfif Len(MyString)>
: >
: >says to me, if the the length of mystring is TRUE.
:
: That is not what it says, however.
: Len(MyString) will never return true.
: It might return 0. It might return 1. It might return 100. It will
: never return true.
: ColdFusion may interpret a non-zero result as true, but that is
: not what
: is returned. This is a side-effect of ColdFusion being a Loosely-typed
: language.
: I'm not saying it is wrong, I'm just saying I think it would be better
: read as:
:
: len(MyString) is 0 or
: Not Len(MySTring) is 0
:
:
:
: --
: Jeffry Houser | mailto:jeff@;farcryfly.com
: DotComIt, Putting you on the web
: AIM: Reboog711 | Phone: 1-203-379-0773
: --
: My CFMX Book:
: <http://www.amazon.com/exec/obidos/ASIN/0072225564/instantcoldfu-20>
: My Books: http://www.instantcoldfusion.com
: My Band: http://www.farcryfly.com
:
:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm