For example:
args = StructNew();
args.field1="some text";
args.field2="true";
args.field3=99;
myFunction(argumentCollection=args);
</cfscript>
myFunction(argumentCollection=args)
But the code could get really messy when there are many arguments. Not to mention when some of the arguments are optional and passed dynamicly, I would need to use cfinvoke and put cfinvokeargument in cfif block.
<cfset myFunction(field1="some long long long long text",
field2="false",
field3=99,
field4=Now()) />
With the "argumentCollection" approach, I can easily pass arguments when needed:
<cfscript>
args = StructNew();
if (hasField1) args.field1 = "some text";
if (hasField2) args.field2 = "true";
if (hasField3) args.field3 = 99;
myFunction(argumentCollection=args);
</cfscript>

