Teledyne LeCroy Conquest User Manual - Users Manual User Manual
Page 231
Appendix A
221
If, Else If, Else
If Expression1 then
Main block 1
< Else If Expression2 then
Main block 2 >
< Else If Expression3 then
Main block 3 >
…
<Else
Main block 4 >
Remark:
If, Else If, If statements, collectively known as branch statements, permit the
execution of different blocks of statements based on the evaluation of the
expressions. Following the convention of other programming languages, if the
expression evaluates to true the immediate block is executed. Otherwise the
control is passed to the next statement. Nesting of branch statements within
other branch statements is allowed.
Example
If CURPOS > 5 and ValueOf(F1) < 8 then
{
H1 = AddField(CURPOS,8,"H1","Field H1","H1");
}
Else If(CURPOS < 9) then
{
H2 = AddField(CURPOS,8,"H2","Field H2","H2");
}
Else
{
H4 = AddField(CURPOS,548,"H4","Field H4","H4");
}