EVALUATE (↑ Statements)
◄Key► ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
Verb: EVALUATE
Function: Tests multiple conditions and executes a different
branch depending on the result.
Syntax:
►►──EVALUATE─┬─identifier-1─┬─┬───────────────────────┬─────►
├─literal-1────┤ │ ┌───────────────────┐ │
├─expression-1─┤ │ ▼ │ │
├─TRUE─────────┤ └─ALSO─┬─identifier-2─┬─┘
└─FALSE────────┘ ├─literal-2────┤
├─expression-2─┤
├─TRUE─────────┤
└─FALSE────────┘
┌──────────────────────────────────────────────────────┐
┌──────────────────────────────┐ │
▼ │ │
►──WHEN phrase-1─┬────────────────┬─imperative-statement-1──►
│ ┌────────────┐ │
│ ▼ │ │
└─ALSO phrase-2──┘
►─┬───────────────────────────────────┬─────────────────────►
└─WHEN OTHER imperative-statement-2─┘
►─┬──────────────┬──────►◄
└─END-EVALUATE─┘
where phrase-1 is:
►───┬─ANY──────────────────────────────────────────────────────┬───►
├─condition-1──────────────────────────────────────────────┤
├─TRUE─────────────────────────────────────────────────────┤
├─FALSE────────────────────────────────────────────────────┤
└─┬─────┬─┬─identifier-3─┬─┬─────────────────────────────┬─┘
└─NOT─┘ ├─literal-3────┤ └┬─THROUGH─┬─┬─identifier-4─┬─┘
└─arith-exp-1──┘ └─THRU────┘ ├─literal-4────┤
└─arith-exp-2──┘
and phrase-2 is:
►───┬─ANY──────────────────────────────────────────────────────┬───►
├─condition-2──────────────────────────────────────────────┤
├─TRUE─────────────────────────────────────────────────────┤
├─FALSE────────────────────────────────────────────────────┤
└─┬─────┬─┬─identifier-5─┬─┬─────────────────────────────┬─┘
└─NOT─┘ ├─literal-5────┤ └┬─THROUGH─┬─┬─identifier-6─┬─┘
└─arith-exp-3──┘ └─THRU────┘ ├─literal-6────┤
└─arith-exp-4──┘
-♦-