Menu

keywords-else

Will Pittenger

Overview

Use with if and then to build traditional if/then/else statements, with switch and case to build switch statements, or with conditionalif and then in [Conditional compilation].

(Note: The then keyword might be dropped as its utility is questionable in a language like ASIL that doesn't allow multiple statements on one line.)

Use with if

\if\ expression boolean condition \then\
  ' Then clause
[\else\
  ' Optional else clause (can be a else if clause)
]

Use with switch

For more on switch statements, see the section [Switch statements]. This will also describe what /LeftPart/ and /RemainingCondition/ can be.

\switch\ [/LeftPart/]
  (\case /RemainingCondition/
    ' Run some code
    \break\
  )...cases

  \else\
    ' Run some more code

Use with conditionalif

\conditionalif\ conditional boolean condition \then\
  ' Then clause
[\else\
  ' Optional else clause (can be a else conditionalif clause)

Related

Wiki: Conditional compilation
Wiki: Keywords
Wiki: Switch statements
Wiki: keywords-case
Wiki: keywords-conditional
Wiki: keywords-conditionalif
Wiki: keywords-if
Wiki: keywords-switch
Wiki: keywords-then