Anvil | Smiths Smiths | Register Register | Login Login |
Search:
Show links Show tools Show tree | Previous document Next document | njet.org > Anvil > Documentation > Language reference > Templates > Tags > <switch>, <case> and <default>

<switch>

  <switch (expr|by)="exprcandidate" >
    ( <case value="exprvalue" >
      statement *
    | <default> 
      statement *
    )*
  </switch>

The ``switch´´ statement transfers control to one fo several statements depending on the the value of a candidate expression. There may only be one ``default´´ statement inside switch. See switch statement.

Attributes:

expr
Candidate expression. Mutually exclusive with by.
by
Candidate expression. Mutually exclusive with expr.
value
Value of case.

See also  | Tags  | Statement tags
Contributes notes:
Add a note
What's new | Anvil