Sage
Tusk Language
Welcome to Sage
Volume (85%) Hide Volume
Topics
Case Statement

Non-Strict

flowchart LR
  Start[Start] --> Case([<tt>case</tt>])
  Case --> Expr([<a href="Expression">Expression</a>])
  Expr --> Of([<tt>of</tt>])
  Of --> Label([<a href="Expression">Expression</a>])
  Label --> Colon([<tt>:</tt>])
  Label --> Comma([<tt>,</tt>])
  Comma -->|&nbsp;#40;1#41;&nbsp;| Colon
  Comma --> Label
  Colon --> Body([<a href="Statement">Statement</a>])
  Body --> Semi([<tt>;</tt>])
  Body --> End([<tt>end</tt>])
  Body --> Else([<tt>else</tt>])
  Semi --> Label
  Else --> ElseStmt([<a href="Statement">Statement</a>])
  Semi --> Else
  ElseStmt --> ElseSemi([<tt>;</tt>])
  ElseSemi --> End
  ElseStmt --> End
  Semi --> End
  End --> Stop

  style Start fill:#44E
  style Stop fill:#E44

Note (1)

Trailing commas are not allowed in Delphi Mode.


Strict

flowchart LR
  Start[Start] --> Case([<tt>case</tt>])
  Case --> StrictColon([<tt>:</tt>])
  StrictColon --> Strict([<tt>strict</tt>])
  Strict --> Expr([<a href="Expression">Expression</a>])
  Expr --> Of([<tt>of</tt>])
  Of --> Label([<a href="Expression">Expression</a>])
  Label --> Colon([<tt>:</tt>])
  Label --> Comma([<tt>,</tt>])
  Comma --> Colon
  Comma --> Label
  Colon --> Body([<a href="Statement">Statement</a>])
  Body --> End([<tt>end</tt>])
  Body --> Semi([<tt>;</tt>])
  Semi --> Label
  Semi --> End
  End --> Stop

  style Start fill:#44E
  style Stop fill:#E44

Note

Strict case statements are not allowed in Delphi Mode.


Last Modified: 2/15 10:06:11 am
In this article (top)  View article's Sage markup
2/15 10:06:11 am