Skip to content
Luxembourg edited this page Mar 19, 2013 · 4 revisions

@switch

command: @switch[/] =, [,,]... [,]

compares against the targets , , etc, until a match is found, at which time the corresponding list of commands is performed.

#$ is substituted with the value of . in this way, the commands in .... 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 is executed.

the following switches are available:

/all - (default) perform the action lists associated with all targets that match . /first - perform only the action list associated with the first target that matches . /notify - queues an '@notify' after all commands in the list.

related topics: switch(), ifelse().

Clone this wiki locally