I think stephen was thinking more future wise.... Len() actually returns
an Integer (or maybe a long) and if CF was to move into a Typed language
then a <CFIF Len()> would be incorrect without some sort of conversion.

HTH


-----Original Message-----
From: Kreig Zimmerman [mailto:kkz@;foureyes.com] 
Sent: Friday, November 8, 2002 16:29
To: CF-Talk
Subject: Re: Studio MX


No.  Len() is evaluated as a Boolean because in CF, True/False, Yes/No, 
and 1(+)/0 are all evaluated as Boolean pairs.

Trust me.  I use this everywhere in my own code.

Stephen Moretti wrote:

><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>
>
>I'll go away now..
>
>Stephen
>
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to