This can also be combined with
flow { } block logic to perform multiple operations in isolated areas making the source code cleaner.
if any
| (expression1) succeed name1s fail name1f
| (expression2) succeed expression2 fail expression2
| (expression3) succeed expression3 fail expression3
| (expression4) succeed expression4 fail expression4
{
// Code here if any of them pass [if any]
// Code here if all of them pass [if all]
} else if any
| (expression5) succeed expression2
| (expression6) fail expression3
| (expression7)
{
} else {
// Code here if it fails
} flow name1s {
// Code here for the expression1 success
} flow name1f {
// Code here for the expression1 fail
}
You can also use a decision cask to encapsulate the code more succinctly (remember, the syntax is <|| cond | if true | if false ||>. Since in this case the condition is external, it is contextually using the result of the indicated expression.
if all
| (expression1) <|name1s | name1f||>
| (expression2) <|expression2 |expression2||>
| (expression3) <|expression3 |expression3||>
| (expression4) <|expression4 |expression4||>
The if all works identically, except that it uses the if all keyword.
--
Rick C. Hodgin