At 03:41 PM 11/9/2002 -0800, you wrote: >Note: never, ever compare boolean expressions to 0 or 1 (or false / >true), especially to 1 (true). <cfif f(x)> is not always equivalent to ><cfif f(x) eq true> - precisely because people can be lazy about mixing >numbers with real booleans.
I am completely confused by this. What should you compare Boolean Expressions to if not False / True or 0 / 1 ? >Note 2: don't write this sort of thing either: > > <cfif somecondition> > <cfset x = 1> > <cfelse> > <cfset x = 0> > </cfif> > >Think about that... you really mean this, don't you: > > <cfset x = somecondition> > >(and then treat 'x' as a boolean) > >The following seems a more common version of that: > > <cfif somecondition> > <cfset y = false> > <cfelse> > <cfset y = true> > </cfif> > >Why not: > > <cfset y = not somecondition> Are you saying that the conditional examples are wrong, or the one-line examples are more efficient? -- 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

