Difference between revisions of "Demo:SwitchStatement7"

From PKC
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<nowiki>{{#switch: {{#expr: 4+2*1}}
<nowiki>{{#switch: {{#expr: 3+2*1}}
  | 1 = one
  | 1 = one
  | 2 = two
  | 2 = two
Line 12: Line 12:
The above text can be better visualized as follow:
The above text can be better visualized as follow:
<syntaxhighlight lang=HTML>
<syntaxhighlight lang=HTML>
{{#switch: {{#expr: 4+2*1}}
<nowiki>{{#switch: {{#expr: 4+2*1}}
  | 1 = one
  | 1 = one
  | 2 = two
  | 2 = two
Line 19: Line 19:
  | 7 = {{uc:sEveN}} <!--lowercase-->
  | 7 = {{uc:sEveN}} <!--lowercase-->
  | #default = other
  | #default = other
}}
}}</nowiki>
</syntaxhighlight>
</syntaxhighlight>
{{#invoke:CodeWrapper| returnHTMLText |{{:{{PAGENAME}}}} }}
</noinclude>
</noinclude>

Latest revision as of 09:24, 19 May 2022

{{#switch: {{#expr: 3+2*1}} | 1 = one | 2 = two | 3|4|5 = any of 3–5 | 6 = six | 7 = {{uc:sEveN}} <!--lowercase--> | #default = other }}


The above text can be better visualized as follow:

<nowiki>{{#switch: {{#expr: 4+2*1}}
 | 1 = one
 | 2 = two
 | 3|4|5 = any of 3–5
 | 6 = six
 | 7 = {{uc:sEveN}} <!--lowercase-->
 | #default = other
}}</nowiki>
{{#switch: {{#expr: 3+2*1}}
 | 1 = one
 | 2 = two
 | 3|4|5 = any of 3–5
 | 6 = six
 | 7 = {{uc:sEveN}} &lt;!--lowercase--&gt;
 | #default = other
}}