Declaring Parameters
Spectre parameters are declared in the script by using the take-parameter tag. The following snippets layout basic options:
take-parameter <parameter_name>
take-parameter <parameter_name> selection=<boolean> { default-all-values }
take-parameter <parameter_name> selection=<boolean> { default <value_strings> }
take-parameter <parameter_name> { default-from-user-property <property_name_string> }
Where <parameter_name> is replaced with the name of the parameter in quotes, <value_strings> is replaced with one or more values in quotes, <property_name_string> is replaced with the name of the user defined property in quotes, and <boolean> is replaced with True or False.
For example:
take-parameter "Input File"
This is the simplest case with no child { } block and thus no default. When the file containing this parameter declaration runs, a parameter of the specified name must be passed in, or an error occurs.
take-parameter "process-month" selection=true {
default-all-values
}
take-parameter "District" selection=true {
default "NE" "SW" "West" "South"
}
take-parameter "Sales" {
default-from-user-property "Sales Managers"
}
Normally parameters are single valued. A take-parameter tag can have selection=true appended to it to enable multiple values. Single-value parameters can be used in strings or expressions. Multi-value parameters can only be used in expressions.
Attempting to pass-parameter multiple (or no) values when the receiving take-parameter declaration is not expecting that, results in a run-time error.
See also: Parameter Examples.