@switch - luxembourg/muxcode-clm GitHub Wiki

@SWITCH

COMMAND: @switch[/<switches>] <string>=<t1>,<c1> [,<tN>,<cN>]... [,<cD>]

Compares <string> against the targets <t1>, <t2>, etc, until a match is found, at which time the corresponding list of commands is performed.

#$ is substituted with the value of <string>. In this way, the commands in <c1>..<cN>..<cD> have a short-hand way of getting at the matched value.

Wildcards match strings, and the < and > operators allowing matching by numeric value. By default, any list whose target matches the string is executed (the targets are not mutually exclusive). If no target matches, the default list <cD> is executed.

The following switches are available:

/all - (default) Perform the action lists associated with all targets that match <string>. /first - Perform only the action list associated with the first target that matches <string>. /notify - Queues an '@notify' after all commands in the list.

Related Topics: switch, ifelse