case

Prev Next

Function Names

case

Synopsis

switch/check ( expression ) { case ( comparison expression ) statement; case ... [ else : statement; ]
switch/check ( expression ) { case ( comparison expression ) { statements }; case ... [ else { statements } ]

Description

See switch and check function for detail.

Call as: procedure

Restrictions

Indirect parameter passing is disabled

Parameter count

1

Parameters

No.TypeDescription
1
code
comparison expression
:string
Values to compare with

This parameter is a piece of code typically found on the right-hand side of a comparison with '=' or '<>'. Single values, ranges (e.g. 3..5), multiple values separated by commas are supported. For text comparison, wildcards are supported if the string is of type softquoted string.

Attention: To avoid hijacking further function parameters as additional values to be compared, put the expression into parentheses if no operators, = or <> have been used. Not an issue if <, >, == or != operators are used.

Examples

See example in switch and case statements

See also

switch
check

Notes

Do not confuse syntax with C/C++! 'case' is always written with values inside parentheses and without colon behind