Pages

Tuesday, February 19, 2013

eq operator in coldfusion is case insenitive (:) very easy to mistake)

eq operator in coldfusion is case insensitive

its very common mistake. remember eq operator in coldfusion is case insensitive.
see below example.

<cfset a = "USD">
<cfset b = "usd">

<cfif a  eq b >   
    <cfoutput>
        yes
    </cfoutput>
<cfelse>       
    <cfoutput>
        else
    </cfoutput>
</cfif>

No comments:

Post a Comment