18.08.2013 Views

LINC Programming Reference Manual - Public Support Login - Unisys

LINC Programming Reference Manual - Public Support Login - Unisys

LINC Programming Reference Manual - Public Support Login - Unisys

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CASE (CS)<br />

Syntax<br />

CASE (CS)<br />

The CASE; command is the central part of a case statement, which enables multiple<br />

actions selected by the case variable to be specified. This is an efficient alternative to using<br />

multiple DO.WHEN; commands.<br />

The commands used to define a case statement are summarized in the following table.<br />

Command Abbreviation Function<br />

BEGIN.CASE; BC; Start of the case statement<br />

CASE; CS; Case condition<br />

OTHERWISE; OW; Default case condition<br />

END.CASE; EC; End of the case statement<br />

Each command (and all enclosed logic commands) must start on a new line.<br />

A BEGIN.CASE; (BC;) command specifies a data item against which values defined by<br />

CASE; commands are compared.<br />

If any of the values specified matches that of the data item, the following logic (up to the<br />

next case condition) is performed and execution continues from the END.CASE; (EC;)<br />

command associated with the case statement.<br />

The OTHERWISE; (OW;) command can be used to specify logic to be performed when no<br />

other case conditions with the CASE; statement apply.<br />

Case statements may be nested to nine levels deep, including the use of case statements<br />

within the logic associated with the OTHERWISE; command.<br />

DDDD DD DDDDDDDDDDDDDDDDDDDDDDDD <br />

ZDDDDDDDDDDDDDD?<br />

3 3<br />

DDDD DAD DADDDDDDDDDDDDDDDDDDDDDDDDDD <br />

DDDDDBDDDDDDDDDDDDDDDDDDDDBDDDDDDDDDDDDDDDDDDDDDDDBDDD <br />

3 3 3<br />

@DD DDY CDDD <br />

3<br />

@DDD <br />

DDDD DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD <br />

DDDD DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD <br />

DDDD DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4<br />

v 1-61

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!