|
|||||
Test expressions | |||||
Prerequisite Concepts |
A test expression is any expression that evaluates to either true
or false
. Comparisons are all test expressions. Test expressions can only be used in conditions or saved in switch
items. They have no numeric or string representations.
The simplest forms of a test expression are:
Comparisons are examples of test expressions. They take either numeric, string, or test expressions as operands and produce a test value (true
or false
) as a result.
Test expressions can be combined with the logical operators &
(and
) and |
(or
). Test expressions can be negated with the operator !
(not
).
Prerequisite Concepts Conditional constructs |
---- |