Title:
Bug 79216:(Watson Migration Closure)Frequently, when looping over a collection, it becomes necessary to manually manage an iteration counter
| View in TrackerStatus/Resolution/Reason: Closed/Deferred/
Reporter/Name(from Bugbase): David McGuigan / David McGuigan (David McGuigan)
Created: 08/01/2009
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 /
Priority/Frequency: Normal / Unknown
Locale/System: English / Platforms All
Vote Count: 1
Problem:
Frequently, when looping over a collection, it becomes necessary to manually manage an iteration counter...<cfset ci = 1 /><cfloop collection="#c#" item="i" > <cfif ci gt 1 >, </cfif>#c[ i ]# <cfset ci++ /></cfloop>Adding support for an optional index attribute to collection loops would simplify and standardize this process. Doing so would feel natural and consistent with the rest of the cfloop modes.<cfloop collection="#c#" item="i" index="ci"> <cfif ci gt 1 >, </cfif>#c[ i ]#</cfloop>
Method:
Result:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3039510
External Customer Info:
External Company:
External Customer Name: David McGuigan
External Customer Email: 5E0D54C04462BF5E992016B6
External Test Config: 08/01/2009
Attachments:
Comments: