SELECT (<expression>)
[(<value>) <statements>]r
[(NOMATCH) <statements>]
SELECT (<expression1>,<expression2>)
[(<value1>,<value2>) <statements>]r
[(NOMATCH) <statements>]
Each combination of values specified within the SELECT command must be specified only once but any number of sort commands can be associated with it.
The SELECT command evaluates the expression (or expressions) to obtain a value (or values) which is then compared with the sets of values following. If one set matches then any associated commands are executed. If no values match then the commands associated with (NOMATCH) are executed, if it has been specified.
After the sort commands for a specific combination have been executed command execution passes to the command following the SELECT command.
Eg. consider updates after a gate-map-test command
or correlated updates after two gate-map-test commands:IF GAMA GATEDBY BAND1 { ... SELECT (GATE) (1) INC SPEC1(GAMA) (4) INC SPEC4(GAMA) (5) { INC SPEC5(GAMA) INC SPEC9(GAMA) } ... }
IF GAMB GATEDBY BAND2 { ... SELECT(GATE1,GATE) (1,1) { INC MAT1(GAMA,GAMB) INC SPEC12(GAMB) } (1,2) INC MAT2(GAMA,GAMB) (NOMATCH) ENDEVENT }
In the second example, if no gate combination matches those provided by the SELECT command then ENDEVENT is executed so no more commands are processing for that event.