when

(when EXPRESSION EXPRESSION)
The first expression (known as the "test" expression) is evaluated. If the expression evaluates to true, the result of the when expression is the result of evaluating the second expression, otherwise the result is void (and the second expression is not evaluated). If the result of evaluating the test expression is neither true nor false, it is an error.

Advanced Student Language


Google