tracker issue : CF-4198586

select a category, or use search below
(searches all categories and all time range)
Title:

Add support for != and == in <cfif>

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Carl Von Stetten / Carl Von Stetten ()

Created: 05/03/2017

Components: Tags, General

Versions: 2016

Failure Type: Enhancement Request

Found In Build/Fixed In Build: 300466 / 2018,0,0,303797

Priority/Frequency: Normal / Some users will encounter

Locale/System: ALL / Windows 10 64 bit

Vote Count: 0

Problem Description:  Lucee supports using != in place of NEQ and == in place of EQ within a <cfif> tag.  ColdFusion should too.

Steps to Reproduce:
<cfset a = 1>
<cfset b = 2>
<cfif a != b>
  foo
</cfif>
http://trycf.com/gist/9875204b57aedf973895408eb00b4e0d/acf2016?theme=monokai

Actual Result:  Error: "Invalid CFML construct found"
Expected Result:  Should work just like Lucee.

Any Workarounds: Use Lucee?

Attachments:

Comments:

I think parity with cfscript is a better way approach this request than asking for parity with Lucee. The real workaround for the example above is <cfscript> a = 1; b = 2; if (a != b) { writeOutput("foo"); } </cfscript>
Comment by Kama S.
823 | May 29, 2017 08:22:45 AM GMT
I guess I should have specified that it already worked in cfscript (on both ColdFusion and Lucee). However, since this bug *specifically* addresses the fact it doesn't work in tags in ColdFusion but does in Lucee, I stand by asking for parity with Lucee on this issue.
Comment by Carl V.
824 | June 30, 2017 04:24:56 AM GMT