Artifact 7c917d7f0a472032bd50b653920dd27daf4e1b50307c04849579659b041b2b73:
- Executable file
r37/lisp/csl/html/r37_0054.html
— part of check-in
[f2fda60abd]
at
2011-09-02 18:13:33
on branch master
— Some historical releases purely for archival purposes
git-svn-id: https://svn.code.sf.net/p/reduce-algebra/code/trunk/historical@1375 2bfe0521-f11c-4a00-b80e-6202646ff360 (user: arthurcnorman@users.sourceforge.net, size: 1272) [annotate] [blame] [check-ins using] [more...]
<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>