Debian Codegraph @

docsrc/xlisp/xlisp-doc/reference/char-not-equal-s.htm

raw
1 <html><head><title>XLISP char/=</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>&nbsp; -&nbsp;
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>char/=</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>&nbsp;&nbsp;-&nbsp;&nbsp;</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>&nbsp;&nbsp;-&nbsp;&nbsp;</nobr></td>
30 <td width="100%"><nobr>xlstr.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>(<b>char/=</b> <i>char1 charN</i> ... )</dt>
40 <dd>char1 - a character expression<br>
41 charN - character expression[s] to compare<br>
42 returns - <a href="t.htm">&nbsp;T&nbsp;</a>
43 if the characters are not equal,
44 <a href="nil.htm">NIL</a> otherwise<br>
45 <b>Note:</b> case is significant with this function</dd>
46 </dl>
47
48 </div></p>
49
50 <h2>Description</h2>
51
52 <p>The 'char/=' function tests if all character arguments are different
53 values. <nobr><a href="t.htm">&nbsp;T&nbsp;</a> is</nobr> returned if the
54 arguments are of different <a href="../misc/ascii-table.htm">ASCII</a>
55 value, <a href="nil.htm">NIL</a> otherwise. <nobr>In the</nobr> case of two
56 arguments, this has the effect of testing if 'char1' is not equal to
57 'char2'. This test is case sensitive, the character '#\a' is different and
58 of greater <a href="../misc/ascii-table.htm">ASCII</a> value than the
59 <nobr>character '#\A'</nobr>.</nobr></p>
60
61 <h2>Examples</h2>
62
63 <pre class="example">
64 (char/= #\a #\b) =&gt; T
65 (char/= #\a #\b #\c) =&gt; T
66 (char/= #\a #\a) =&gt; NIL
67 (char/= #\a #\b #\b) =&gt; NIL
68 (char/= #\A #\a) =&gt; T
69 (char/= #\a #\A) =&gt; T
70 </pre>
71
72 <p><div class="box">
73
74 <p><b>Caution:</b> If you type 'char\=' [with a backslash] instead of
75 'string/=' by mistake, no error will be signalled because backslash is the
76 single escape character and the XLISP reader will evaluate 'char\=' as
77 <a href="char-equal-s.htm">char=</a>, but the meaning of the test is
78 exactly reversed.</p>
79
80 </div></p>
81
82 <p>See also:</p>
83
84 <ul>
85 <li><nobr>Contents &rarr; <a href="../manual/contents.htm#character-functions">Character Functions</a></nobr></li>
86 </ul>
87
88 <p><nobr>&nbsp;&nbsp;<a href="#top">Back to Top</nobr></a></p>
89
90 <hr>
91
92 <a href="../start.htm">Nyquist / XLISP 2.0</a>&nbsp; -&nbsp;
93 <a href="../manual/contents.htm">Contents</a> |
94 <a href="../tutorials/tutorials.htm">Tutorials</a> |
95 <a href="../examples/examples.htm">Examples</a> |
96 <a href="reference-index.htm">Reference</a>
97
98 </body></html>