Select command

The SELECT command is used for matching specific parameter values to specific sort commands. This allows gate numbers passed by any of the gate-map-test commands to be matched to specific update commands.

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.

Example

Consider updates after a gate-map-test command. See if...gatedby and loopif...gatedby commands.

IF GAMA GATEDBY BAND1 {
       ...
    SELECT (GATE)
        (1) INC SPEC1(GAMA)
        (4) INC SPEC4(GAMA)
        (5) {
            INC SPEC5(GAMA)
            INC SPEC9(GAMA)
            }
       ...
    }

Example

or correlated updates after two gate-map-test commands:

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.