> There really is no reason to ever have a comparison in a <cfset> tag as
> you can't do logic with it or assign the result to a value. Most likely
> the programmer made a mistake and since CF never threw an error, he or
> she didn't notice.

Actually, you can use operators to set a variable to a boolean value if you
want to...

<cfset variables.isCorrectPW = form.password eq myQuery.password>

.and then use that variable as a boolean during logic operations...

<cfif not variables.isCorrectPW>
  <cflocation url="login.cfm">
</cfif>

Why would someone want to do this?  Not sure..  I've never had a use for it
personally, but the functionality is there if you need it.  Simply saying
<cfset 1 eq 1> will have the expression be evaluated to true, but the result
will simply be tossed out, as was happening to the original poster.

-Justin Scott, Lead Developer
 Sceiron Internet Services, Inc.
 http://www.sceiron.com


______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to