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

Specifying a Default Case

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

If you do not specify a default case for the Case structure to handle out-of-range values, you must explicitly list every possible input value. For example, if the selector is an integer and you specify cases for 1, 2, and 3, you must specify a default case to execute if the input value is 4 or any other unspecified integer value.

Complete the following steps to specify a default case.

  1. Move to an existing case.
  2. Right-click the case selector label and select Make This The Default Case from the shortcut menu to make an existing case the default case.

You also can complete the following steps to specify a default case.

  1. Move to the case you want to make default and click on the case selector label with the Labeling tool.
  2. Enter Default in the selector label.
Note  Do not add quotation marks around Default. Doing so indicates that the value is a string, rather than the default case.
  1. Press the <Enter> key.

Resources


 

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