aa_macro syntax 
 aa_macro source 
 HTML source 
 HTML render 
Key

4.175 - [switch] Built-In

Mnemonic 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)??

Other built-ins used here:  [b] ,  [case]  and  [style] 

Keyboard Navigation
, Previous Page . Next Page t TOC i Index

Valid HTML 4.01 Loose
 

This manual was generated with wtfm
wtfm uses aa_macro and SqLite
aa_macro uses python 2.7