Parameter Overview
Spectre parameters allow you to vary the value of variables in your scripts for each run. All Spectre contexts support the use of parameters, for example Build, cPlan, and Dive files. The parameters can be either single-valued or multi-valued, such as with a set or an array.
Single-valued parameters can be used with $(<parameter_name>) inside strings, or with the param(<parameter_name>) function inside expressions. Using a multi-valued parameter this way generates an error.
Syntax:
$(parameter_name)
Returns the value of the parameter_name parameter when used in a quoted string.
param("parameter_name")
Returns the value of the parameter_name parameter when used in a Spectre expression.
Multi-valued parameters are useful when constructing filters. You can evaluate the value of a parameter with the param_contains and param_match functions, which return True or False.
Syntax:
param_contains(parameter_name : string, value : string) : expression
Returns True if the value is in the parameter’s set or matches exactly for a single-valued parameter.
param_match(parameter_name : string, column_name : string) : expression
Returns True if the value of that column on a given row is in the parameter’s set or matches exactly.
See Pseudo Functions for more information about the Spectre functions param, param_contains, and param_match.