IF and ELSE conditions cannot be nested. A new IF statement starts fresh. For example:
IF condition-a THEN instruction-1,
instruction-2,
IF condition-b THEN instruction-3,
instruction-4,
ELSE instruction-5,
ALWAYS instruction-6
This set of instructions can have four possible outcomes, as follows:
|
First IF Satisfied |
Second IF Satisfied |
Execute Instructions |
|
Yes |
Yes |
1,2,3,4,6 |
|
Yes |
No |
1,2,5,6 |
|
No |
Yes |
3,4,6 |
|
No |
No |
5,6 |
| Copyright © 2012 CA. All rights reserved. |
|