-
Notifications
You must be signed in to change notification settings - Fork 0
@switch
@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().