| 1 | <html><head><title>XLISP <=</title> |
| 2 | |
| 3 | <link rel="stylesheet" type="text/css" href="reference.css"> |
| 4 | |
| 5 | </head> |
| 6 | |
| 7 | <body> |
| 8 | |
| 9 | <a href="../start.htm">Nyquist / XLISP 2.0</a> - |
| 10 | <a href="../manual/contents.htm">Contents</a> | |
| 11 | <a href="../tutorials/tutorials.htm">Tutorials</a> | |
| 12 | <a href="../examples/examples.htm">Examples</a> | |
| 13 | <a href="reference-index.htm">Reference</a> |
| 14 | |
| 15 | <hr> |
| 16 | |
| 17 | <h1><=</h1> |
| 18 | |
| 19 | <hr> |
| 20 | |
| 21 | <p><table cellpadding="0" cellspacing="0" style="margin-left:10px"><tbody> |
| 22 | <tr valign="top"> |
| 23 | <td><nobr>Type:</nobr></td> |
| 24 | <td><nobr> - </nobr></td> |
| 25 | <td width="100%"><nobr>function (subr)</nobr></td> |
| 26 | </tr> |
| 27 | <tr valign="top"> |
| 28 | <td><nobr>Source:</nobr></td> |
| 29 | <td><nobr> - </nobr></td> |
| 30 | <td width="100%"><nobr>xlmath.c</nobr></td> |
| 31 | </tr> |
| 32 | </tbody></table></p> |
| 33 | |
| 34 | <h2>Syntax</h2> |
| 35 | |
| 36 | <p><div class="box"> |
| 37 | |
| 38 | <dl> |
| 39 | <dt><nobr>(<= <i>expr1 expr2</i> ...)</nobr></dt> |
| 40 | <dd><i>exprN</i> - a numeric expression<br> |
| 41 | returns - <a href="t.htm"> T </a> if the results of |
| 42 | comparing the expressions are all true, |
| 43 | <a href="nil.htm">NIL</a> otherwise</dd> |
| 44 | </dl> |
| 45 | |
| 46 | </div></p> |
| 47 | |
| 48 | <h2>Description</h2> |
| 49 | |
| 50 | <p>The <nobr>'<=' [less-than-or-equal]</nobr> function takes an arbitrary |
| 51 | number of numeric arguments. <nobr>It checks</nobr> to see if all the |
| 52 | numbers are monotonically <nobr>non-decreasing</nobr>. |
| 53 | <a href="t.htm"> T </a> is returned if the arguments |
| 54 | are numerically, and monotonically <nobr>non-decreasing</nobr>, |
| 55 | <a href="nil.htm">NIL</a> is returned otherwise. <nobr>For two</nobr> |
| 56 | arguments, this has the effect of testing if 'expr1' is less than or equal |
| 57 | <nobr>to 'expr2'</nobr>.</p> |
| 58 | |
| 59 | <h2>Examples</h2> |
| 60 | |
| 61 | <pre class="example"> |
| 62 | (<= 1 1) => T |
| 63 | (<= 1 2) => T |
| 64 | (<= 2.0 1.99) => NIL |
| 65 | (<= 1 2 3 3) => T |
| 66 | (<= 1 2 3 3 2) => NIL |
| 67 | (<= "aa" "aa") => <font color="#AA0000">error: bad argument type</font> |
| 68 | (setq a 12 b 99.9) => 99.9 <font color="#008844">; set up A and B with values</font> |
| 69 | (<= a b) => T |
| 70 | (<= b a) => NIL |
| 71 | </pre> |
| 72 | |
| 73 | <p>See <a href="setq.htm">setq</a>.</p> |
| 74 | |
| 75 | <p>See also:</p> |
| 76 | |
| 77 | <ul> |
| 78 | <li><nobr>Contents → <a href="../manual/contents.htm#arithmetic-functions">Arithmetic Functions</a></nobr></li> |
| 79 | </ul> |
| 80 | |
| 81 | <p><nobr> <a href="#top">Back to Top</nobr></a></p> |
| 82 | |
| 83 | <hr> |
| 84 | |
| 85 | <a href="../start.htm">Nyquist / XLISP 2.0</a> - |
| 86 | <a href="../manual/contents.htm">Contents</a> | |
| 87 | <a href="../tutorials/tutorials.htm">Tutorials</a> | |
| 88 | <a href="../examples/examples.htm">Examples</a> | |
| 89 | <a href="reference-index.htm">Reference</a> |
| 90 | |
| 91 | </body></html> |