CAlive will introduce the [if any] and [if all] blocks.
The [if any] block allows a group of tests to be conducted, and if
any of them pass it will enter the block, and if all fail it will
fall through to the else.
The if all block allows a group of tests to be conducted, and if
all of them pass it will enter the block, and if any of them fail
it will fall through to the else.
The succeed and fail portions are optional.
Each (expression) can be written as any valid, boolean expression.
They do not require parentheses.
https://groups.google.com/d/msg/caliveprogramminglanguage/IEb6wVv9cW0/XTBcF7CqAgAJ
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 all of them pass
} else {
// Code here if it fails
} flow name1s {
// Code here for the expression1 success
} flow name1f {
// Code here for the expression1 fail
}
Note: The if all block is identical, except it uses the "if all" header.
I mention it here because such a feature could be added to C/C++.
--
Rick C. Hodgin