case (MathScript RT Module Keyword)

LabVIEW 2012 MathScript RT模块帮助

版本日期:June 2012

产品编号:373123C-0118

»查看产品信息
下载帮助
(仅限Windows)

Owning Class: programming

Requires: MathScript RT Module

Syntax

case expression

Description

Specifies a case 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. LabVIEW executes the first matching case.

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

otherwise
switch

文章是否对您有帮助?

没有帮助