Yes, CFML supports dynamic arguments as long as it supports user-defined functions.
All arguments explicitly given or passed without definition exist in the Arguments area.
The "Arguments" area can be considered both an array and a structure (key / value).
Here is the closest equivalent to your example using the script syntax:
function func() { for (a in arguments) WriteOutput(arguments[a] & "is a quality argument"); }
Note that a in this example is the key name, not the value, therefore arguments[a] .
To be processed as code, the above script must either be in the <cfscript> .. </cfscript> , or alternatively inside the component { .. } block inside the .cfc file.
Here are a couple of tag versions, the first equivalent to the for / in loop:
<cffunction name="func"> <cfloop item="a" collection=#Arguments#> <cfoutput>#Arguments[a]# is a quality argument</cfoutput> </cfloop> </cffunction>
And this allows you to directly access the value (i.e. a is the value here):
<cffunction name="func"> <cfloop index="a" array=#Arguments#> <cfoutput>#a# is a quality argument</cfoutput> </cfloop> </cffunction>
In Railel * CFML, this last example can be expressed in a script as:
function func() { loop index="a" array=Arguments { WriteOutput(a & 'is a quality argument'); } }
* Railo is one of two Open Source alternatives for Adobe ColdFusion, the other is Open BlueDragon .