tracker issue : CF-3041679

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

Bug 83389:(Watson Migration Closure)CFML should have for-in loops for all loopable constructs

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): marc esher / marc esher (marcesher)

Created: 06/18/2010

Components: Language

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 /

Priority/Frequency: Major / Most users will encounter

Locale/System: English / Platforms All

Vote Count: 3

Problem:

CFML should have for-in loops for all loopable constructs.Currently, structs have a for-in loop. Arrays get it in 9.0.1. We should be able to loop over lists and queries with a for-in syntax, too:list = "one,two,three";for(el in list){   writeoutput(el);}query = getSomeData();for(row in query){  writeOutput(row.column);}
Method:


Result:

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

Watson Bug ID:	3041679

External Customer Info:
External Company:  
External Customer Name: marc esher
External Customer Email: 70390EBF47F01CAF992015B9
External Test Config: 06/18/2010

Attachments:

Comments:

This bug has been voted..
Vote by External U.
22027 | November 11, 2011 12:55:58 AM GMT
This bug has been voted..
Vote by External U.
22028 | November 11, 2011 12:55:59 AM GMT
+1, and also queryGetRow() would be nice too (to be able to get this query row as a struct, even when not within the new for-in query loop) ..and queryAppend(), but that's getting off on a tangent
Vote by External U.
22029 | November 11, 2011 12:56:01 AM GMT