Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Use of 'equals' as variable

Explorer ,
Jul 12, 2010 Jul 12, 2010

I am running the Code Analyzer in CF9 against a program written for CF 6.1.  I get the following parse error:\

Exception while parsing file: Invalid CFML construct found on line 50 at column 16.ColdFusion was looking at the following text:<p>equals</p><p>The CFML compiler was processing:<ul><li>a CFSET tag beginning on line 50, column 10.<li>a CFSET tag beginning on line 50, column 10.</ul>.

The line in question reads: <CFSET equals = "/">

What is wrong with that line?  Is 'equals' allowed as a variable name?

FYI - a couple lines down there is this statement that does not throw an error: <CFSET equals = "=">

316
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jul 12, 2010 Jul 12, 2010
LATEST

EQUALS is a resvered, if seldom used, word in CF.  It should have been failling in 6.1 since it has always been a reserved word as far as I can recall.

http://www.adobe.com/livedocs/coldfusion/6.1/htmldocs/cfml_b19.htm

It is the same as (I had to resist saying "equals") the EQ operator.

I.E.

<cfif this EQ that>  Can also be written <cfif this EQUALS that>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources