Peep this (inherited) code a second:
<cfif chkRegular AND chkProxy>
<cfset chkPrevious = "TRUE">
<cfelse>
<cfthrow>
</cfif>
Now, I see above where, in a big next of if else then loops, chkRegular
and chkProxy could be assigned as a string "TRUE" or "FALSE". I guess I
have 2 questions on this. Is it reliable to do <cfif varName> where the
variable is a text string and not a boolean value? Also, what would
happen to this code if chkRegular did not exist, would the else
statement run, or would an error be generated?
Personally, I always do <cfif varName is True>, or evaluate against a
string in this case <cfif varName eq 'TRUE'>
Just looking for opinions. =)
Chris
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2
Build sales & marketing dashboard RIAâs for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272644
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4