Select Block

Description

A BCE Select clause of a Select …. Case statement. This block starts the statement. It must be followed by at least one Case Block and an End Select Block.

Parameters

This function block has the following parameter:

Parameter

Description

Expression

An RCO Variable or any String or numeric expression. Strings must be in closed in double quotes.

Example

The above function block uses a Select Block and all related blocks.

  1. First, load tribute into an RCO Variable. For this example, the Attribute "COLOR" is loaded into RCO Variable 1.

  2. The next Select Block will perform a comparison on the contents of the RCO Variable. This example uses an RCO Variable, but any string or numeric expression will also work.

  3. The next block is a Case Block, and it is doing a comparison on "RED" and "GRN". If the RCO Variable contains either of these two values, then the function blocks immediately following the Case Block, up to the next Case Block, Case Else or End Select, will be executed. After the statements are executed, execution will jump to the block immediately following the End Select Block.

  1.  The same operation will be performed on the next Case Block.

  2. The next block is the Case Else Block. The function blocks immediately following the Case Else Block are executed if none of the other Case Blocks in this statement evaluated to True.

  3. Finally, the End Select Block terminates the Select Statement.

More information

Select…Case (Statement).

Case Else Block (Function Block).

Conditional function block list.