Text Syntax
When the Edit Text option button is selected in the Rules Builder, the rules can be displayed or edited in text mode. In text mode, white space is ignored. Default tabs are inserted when converting from tree view mode to indicate nested conditionals.
Name = Formula
When editing the rules in text mode, the rules types use the following syntax:
Name = Formula
In text mode, this is expressed as:
name = EvalExpr("formula")
Name = Model
In the text mode, this is expressed as:
name = EvalModel("enterprise-path", version, desired_statistic, "category")
Linking to Other Rules
Linking to other rules is specified only in text mode; if you had copied the rules, they would have been included as individual rule steps. To specify linking to other rules in text mode, use the following syntax:
ImportRules("enterprise-path", version)
Parameter | Description |
---|---|
enterprise-path | A string that specifies the STATISTICA Enterprise path name of the model |
version | It specifies the version number from SDMS. 0 refers to the latest value and should be used if SDMS is not specified. -100 refers to the latest approved version. Otherwise, this is the explicit version number of the model. |
Conditionals
In the text mode, the if/elseif/else construct is specified as follows:
If( EvalExpr("expression") ) Rules steps… ElseIf( EvalExpr("expression") ) Rules steps… Else Rules steps… EndIf
Parameter | Description |
---|---|
expression | Any expression allowed by the STATISTICA Spreadsheet formulas, including variables from the input data file and rules variables that have been previously defined |
Rules steps… | Specify the rules steps to execute as defined by the conditional executional logic |
ElseIf | Optional clause |
Else | Optional clause |
EndIf | Must be specified to designate the end of the if/elseif/else clause |
ArrayMax/ArrayMin
name = ArrayMax("array-name", index)
name = ArrayMin("array-name", index)
Parameter | Description |
---|---|
name | Specifies rules variable name, and follows standard STATISTICA variable name conventions. |
array-name | Specifies the specific array name, and follows standard STATISTICA variable name conventions. |
index | Specifies the numeric ordered index, starting with 1, that specifies the sorted values from either the highest weighted value (ArrayMax), or lowest weighted value (ArrayMin). |