Tinderbox v10 Icon

Conditional statements using multiple arguments

If() conditional statements and queries may use more than one argument using logical joins. See AND and OR join syntax.


( A & B )

Reads: if condition A AND condition B are true, then this compound query is true.

Contrast this with the &= operator (below).


( A &= B )

Reads: result is true if condition A is currently true and, if so, if condition B is also true.

Thus, if condition A is false, condition B is not checked and the overall result is false. Thus in some cases only condition A is evaluated.

By comparison, with a ( A & B ) query both condition A and condition B are always evaluated.


( A | B )

Reads: if condition A OR condition B is true, then this compound query is true.

Contrast this with the |= operator (below).


( A |= B )

Reads: result is true if condition A is currently true or, if so if condition B is true.

Thus, if condition A is false, condition B is not checked and the overall result is false. Thus in some cases only condition A is evaluated.

By comparison, with a ( A | B ) query both condition A and condition B are always evaluated.


(A | B) & ( C | ( D | E ) )

This is a more complex example of logical joins. Reads: if (condition A OR condition B is true) AND (condition C OR (either condition D OR condition E are true)), then this compound query is true.


See also—notes linking to here: