Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

switch (MathScript RT Module Keyword)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Owning Class: programming

Requires: MathScript RT Module

Syntax

switch

Description

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.

Examples

Details

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT Not characterized

Examples

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

Related Topics

case
otherwise


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit