Product Site

5.1.7.20. Logical Methods

Note

For NOT (prefix \), omit the parentheses and argument.

Returns .true or .false, the result of performing the specified logical operation. The receiver object and the argument are character strings that evaluate to 1 or 0.

The logical_operator can be:
&

AND (Returns 1 if both terms are .true.)
|

Inclusive OR (Returns 1 if either term or both terms are true.)
&&

Exclusive OR (Returns 1 if either term, but not both terms, is .true.)
Prefix \

Logical NOT (Negates; 1 becomes 0, and 0 becomes 1.)
Example 5.57. String class — logical methods
Say 1&0     -->     0
Say 1|0     -->     1
Say 1&&0    -->     1
Say \1      -->     0