core

### Case / End Case

The Insert | Flow Control Command | Control Pairs | Case / End Case menu option allows you to add a conditional block to the measurement routine. The items between the CASE and the END CASE commands will execute if the expression for the case statement evaluates to a value equal to the expression of the corresponding SELECT command. Otherwise, the block of statements will be skipped. The CASE / END CASE statement block must be located directly after a SELECT command or an END CASE command of a previous CASE / END CASE block. Also, PC-DMIS cannot compare multiple expressions on a single case statement.

The Edit window command line for a CASE / END CASE statement reads:
CASE/expression
END_CASE/

To insert the Case / End Case option:

1. Place the cursor in the desired location of the Edit window. Note the positional requirements stated above.

2. Select Case / End Case from the menu bar. The CASE / End CASE statements will appear in the Edit window.

For a code sample see the "Code Sample of Select / End Select" topic.