Member of the programming class.
case expression
Specifies a case in a case-switch statement. Use case and switch together. The principle calling structure of a case-switch statement is:
switch expression
case expression
statement, ... , statement
...
otherwise
statement, ... , statement
end
The otherwise case is optional. LabVIEW executes the first matching case.
color = 'green';
switch color
case 'green'
disp('color is green');
case 'red'
disp('color is red');
otherwise
disp('color is neither green nor red')
end