From 6:00 PM CST Friday, Feb 15th - 2:00 AM CST Sunday, Feb 17th, ni.com will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Version:

Specifies a switch in a switch statement.

Use case and switch together. The principal calling structure of a switch statement is:

switch expression

case expression

statement, ... , statement

...

otherwise

statement, ... , statement

end

The otherwise case is optional.

## Syntax

switch
A = 1
switch A
case 1
A = A + 1
otherwise
A = A - 1
end