PCB Matrix Format
by Numerical Innovations, Inc. (www.numericalinnovations.com)
CHOOSE array

MATRIX Array Level: 1

The CHOOSE array is used to execute multiple conditional tests.

Note
CHOOSE is used in conjunction elements: <when> <otherwise>

XML example:

<choose>
<when test="expression">
... some output ...
</when>
<when test="other_expression">
... some output ...
</when>
<otherwise>
... some output ....
</otherwise>
</choose>




<WHEN test="expression">

Attributes
TEST Assign a condition that is evaluated during code execution. If the result evaluates to True, the following elements will be processed.




<OTHERWISE>

Attributes
No arguments. OTHERWISE is executed only if all previous WHEN elements evaluated: FALSE
<choose>
<when test="1==1 && 1==3">
<MESSAGE> First Choice Passed! </MESSAGE>
</when>
<when test="2!=2 || 2==2">
<MESSAGE> Second Choice Passed! </MESSAGE>
</when>
<otherwise>
<MESSAGE> Otherwise Passed! </MESSAGE>
</otherwise>
</choose>


Second Choice Passed!