Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

case (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.2 Help
August 2006

NI Part Number:
371361B-01

»View Product Info

Member of the programming class.

Syntax

case expression

Description

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.

Examples

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

switch


Resources


 

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