Switch Statement

A switch-case-statement on buttons [SWITCH], [CASE], [DEFAULT] has to be conform to the following syntax.

#SWITCH expression: #CASE constant1: statement1 #CASE constant2: statement2 [...] #DEFAULT alternative statement

At least one case is expected. Other than that the number of cases is unlimited. All combinations of types are possible.

Syntax

#SWITCH expression: #CASE constant1: statement1 #CASE constant2: statement2 [...] #DEFAULT alternative statement

Types
 Variable NameValue TypeVariable Type
Expression:expreal, complexboolean, scalar, vector, matrix, signal, xy-data
Constant:conreal, complexboolean, scalar, vector, matrix, signal, xy-data
Statement:stareal, complexboolean, scalar, vector, matrix, signal, xy-data
Result:  real, complex boolean, scalar, vector, matrix, signal, xy-data
Calculator Input

Use the SWITCH, CASE, and DEFAULT buttons to complete the operation.

Example
IDDescriptionTypeValueExpression
xArgumentREAL11
c Result REAL 6 #SWITCH x: #CASE -1: 4 #CASE 0: 5 #DEFAULT 6