Sometimes we have to test complicated logical conditions. Complex conditions can often be expressed in terms of more elementary conditions by means of the logical connectives "AND", "OR", and "NOT". Although Refal Plus does not provide logical connectives explicitly, they can be easily represented by other constructs.
Suppose we have two conditions and must determine whether both of them are satisfied.
\{ Q';}, Q''
If the first condition is represented by a source S, and the second by a path Q, the compound condition can be tested by evaluating the path S, Q.
And, finally, if both conditions are represented by result expressions Re' and Re'', the compound condition can be tested by evaluating the result expression Re' Re".
Suppose we have two conditions and must determine whether one (or both) of them are satisfied.
\{ Q'; Q''; }
# \{Q;}
which is an abbreviation to the path # \{Q;}, .
# S
which is an abbreviation to the path # S , .
In both cases we take the opportunity of omitting the rests consisting of a single comma.