If you don't want to parse all th arguments then you could use a list a David suggested above. You would still need to insert the values in the correct position in the list. Alternatively use an associative array which gives you key-value pairs, so you could use the key as the label for the parameter e.g. myArray["c"] = 10.
If you are familiar with object-oriented programming then you can implement the equivalent of a protected class. You can then have a function that acts as a method call (i.e. do something ) which uses properties set using functions that act as accessors (i.e. set value / get value). These properties can be stored in a namespace (and if you want to can put all these definitions into a separate file and use the Include function to reference them).
Below is some example code that illustrates this principle. There is a function (method call) called Standard Capability Analysis that takes 2 arguments - a reference to the data table column, and the type of distribution to use for the calculation. The method call also requires specification values, but these are set using accessor methods Set LSL / Get LSL etc. The values associated with these properties are stored in a namespace.
capdat = New Namespace( "MyCapabilityAnalysis" );
capdat:lsl = List();
capdat:target = List();
capdat:usl = List();
Get LSL = Function({colIndex},{Default Local},
retVal = .;
If (!IsMissing(capdat:lsl[colIndex]),
retVal = capdat:lsl[colIndex]
,
Get Specs(colIndex);
retVal = capdat:lsl[colIndex]
);
retVal
);
Get Target = Function({colIndex},{Default Local},
retVal = .;
If (!IsMissing(capdat:target[colIndex]),
retVal = capdat:target[colIndex]
,
Get Specs(colIndex);
retVal = capdat:target[colIndex]
);
retVal
);
Get USL = Function({colIndex},{Default Local},
retVal = .;
If (!IsMissing(capdat:usl[colIndex]),
retVal = capdat:usl[colIndex]
,
Get Specs(colIndex);
retVal = capdat:usl[colIndex]
);
retVal
);
Standard Capability Analysis = Function({colIndex,distType},{Defalt Local},
lsl = Get LSL(colIndex);
target = Get Target(colIndex);
USL = Get USL(colIndex);
pY = Column( this:yCols[colIndex] ) << Get Name;
funcDef = Eval Insert( "\[
this:dd = this:tempDt << Distribution(
Continuous Distribution(
Column( ^pY^ ),
Quantiles( 0 ),
Moments( 0 ),
Vertical( 0 ),
Outlier Box Plot( 0 ),
Capability Analysis( LSL(^lsl^),USL(^usl^),Target(^target^) ),
Fit Distribution(
^distType^(
Goodness of Fit( 1 )
),
)
)
);
]\");
Eval( Parse( funcDef ) );
);
-Dave