<A NAME=OR>
<TITLE>OR</TITLE></A>
<b><a href=r37_idx.html>INDEX</a></b><p><p>
<B>OR</B> _ _ _ _ _ _ _ _ _ _ _ _ <B>operator</B><P>
<P>
The <em>or</em> binary logical operator returns true if either one or
both of its arguments is true.
<P> <H3>
syntax: </H3>
<P>
<P>
<logical expression> <em>or</em> <logical expression>
<P>
<P>
<P>
<logical expression> must evaluate to true or nil.
<P>
<P>
<P> <H3>
examples: </H3>
<P><PRE><TT>
a := 10;
A := 10
if a<0 or a>140 then write "not a valid human age" else
write "age = ",a;
age = 10
a := 200;
A := 200
if a < 0 or a > 140 then write "not a valid human age";
not a valid human age
</TT></PRE><P>The <em>or</em> operator is left associative: <em>x or y or z</em>
is equivalent to
<em>(x or y)</em> <em>or z</em>.
<P>
<P>
Logical operators can only be used in conditional expressions, such as
<P>
<P>
<A HREF=r37_0052.html>if</A>...<em>then</em>...<em>else</em>
and
<A HREF=r37_0228.html>while</A>...<em>do</em>.
<em>or</em> evaluates its arguments in order and quits, returning true,
on finding the first true statement.
<P>
<P>
<P>