tracker issue : CF-3041262

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

Bug 82578:var declaration should be allowed in all forms of for loop

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Sean Corfield / Sean Corfield (Sean Corfield)

Created: 04/01/2010

Components: Language, CFSCRIPT

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 9,0,0,251028 /

Priority/Frequency: Trivial / Unknown

Locale/System: English / Mac 10 All

Vote Count: 2

Problem:

var declaration should be allowed in all forms of for loop.for ( var i = 1; i <= 10; ++i ) { ... } is allowed - declaring i as local.for ( var k in s ) { ... } should be allowed - declaring k as local.
Method:


Result:

Invalid CFML construct found on line 3 at column 1.ColdFusion was looking at the following text:forThe CFML compiler was processing:A script statement beginning with for on line 3, column 1.A cfscript tag beginning on line 1, column 2. The error occurred in /Applications/ColdFusion9/wwwroot/cf9/syntax.cfm: line 31 : <cfscript>2 : s = { a = 1, b = 2 };3 : for (var k in s ) writeoutput( k & '<br />' );

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3041262

External Customer Info:
External Company:  
External Customer Name: Sean Corfield
External Customer Email: 479B4EDC43F3A88B992016B6
External Test Config: 04/01/2010

Attachments:

Comments: