> <cfmode type="pedant">
> > 
> > And, really, I would use this:
> > 
> > <cfif Len(Form.Formname)>
> > 
> 
> should be 
> 
> <cfif Len(Form.Formname) GT 0>
> 
> BECAUSE Len() DOES NOT RETURN A BOOLEAN!
> 
> </cfmode>

Pedantry can be dangerous. While Len returns an integer, CF treats non-zero
integer values as boolean "true" values when they're used in boolean
expressions.

Now, you may argue that your explicit syntax is more readable, but I'd
counter that by saying that any competent CF developer should know that
integers are treated as boolean values.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to