Search                        Top                                  Index
HELP OR                                    Revised: Fran Evelyn Jul 1985
                                         Updated: Adrian Howard Mar 1992

The infix operator -or- is used to form a "disjunction" of two
expressions. For example:

    list = [] or hd(list) = "a"

The expression

    <P> or <Q>

is the value of <P> unless <P> is -false-, when it is the value of <Q>.
In other words, unless both <P> and <Q> evaluate to -false-, the
expression is true (since POP-11 treats as -true- any value which is not
-false-).

Normally OR will be used with *BOOLEAN expressions, when it can be
treated as a logical OR operation.

There is also a bitwise logical 'or' operator (||) on integers treated
as sequences of "bits", see REF *NUMBERS/Bitwise details.

Also see:

    HELP *AND           --- Forming conjunctions in POP-11
    HELP *BOOLEAN       --- Boolean expressions and values
    HELP *CONDITIONALS  --- Summary of POP-11 conditional statements

    REF *RECORDS/Booleans --- Full information on "booleans"


--- C.all/help/or
--- Copyright University of Sussex 1992. All rights reserved. ----------