Lugaru's Epsilon
Programmer's
Editor 14.04

Context:
Epsilon User's Manual and Reference
   Epsilon Extension Language
      . . .
      Initialization
      Statements
         . . .
         If Statement
         Looping Statements
         Switch Statements
         Break and Continue Statements
         Return Statement
         . . .
      Conversions
      . . .

Previous   Up    Next
Looping Statements  Epsilon Extension Language   Break and Continue Statements


Epsilon User's Manual and Reference > Epsilon Extension Language > Statements >

Switch Statements

switch ( expression )
        statement


case constant-expression: statement


default: statement

Statements within the statement following the switch (which is usually a block, as described below) are labeled with constant expressions using case. The expression is evaluated (it must yield an int), and Epsilon branches to the case statement with the matching constant. If there is no match, Epsilon branches to the default statement if there is one, and skips over the switch statement if not.

A case or default statement associates with the smallest surrounding switch statement. Each switch statement must have at most one case statement with any given value, and at most one default statement.



Previous   Up    Next
Looping Statements  Epsilon Extension Language   Break and Continue Statements


Lugaru Epsilon Programmer's Editor 14.04 manual. Copyright (C) 1984, 2021 by Lugaru Software Ltd. All rights reserved.