§ 4.184 - [switch] Built-InMnemonic aid: switch for SWITCH setup for case See also: [case] , [for] , [in] and [stage] This built in works with [case] to build a switch/case mechanism that selects styles based on specific cases. [switch] instances are global. The examples below demonstrate basic use: [switch (csep=X,)(isep=Y,)(default=styleName,)switchName caseYstyleName(XcaseXstylename)] [style foo foo([b])bar] [style bar bar([b])foo] [switch test1 1|foo,2|bar] [case test1 1,bah] [case sep=|,test1 2|humbug] [style rude dude:[b]!] [style remark remark:"[b]"] [style huh ??([b])??] [switch csep=^,isep=$,test2 A$rude^B$remark] [case test2 A,shhhh] [case test2 B,speaking extemporaneously] [switch default=huh,test3 x|foo,y|bar] [case test3 x,with-foo] [case test3 y,with-bar] [case test3 z,with-nothing] foo(bah)bar bar(humbug)foo dude:shhhh! remark:"speaking extemporaneously" foo(with-foo)bar bar(with-bar)foo ??(with-nothing)??
foo(bah)bar
bar(humbug)foo
dude:shhhh!
remark:"speaking extemporaneously"
foo(with-foo)bar
bar(with-bar)foo
??(with-nothing)??
Keyboard Navigation
, Previous Page . Next Page t TOC i Index |