Nyquist / XLISP 2.0 -
Contents |
Tutorials |
Examples |
Reference
char/=
Type: |
- |
function (subr) |
Source: |
- |
xlstr.c |
Syntax
- (char/= char1 charN ... )
- char1 - a character expression
charN - character expression[s] to compare
returns - T
if the characters are not equal,
NIL otherwise
Note: case is significant with this function
Description
The 'char/=' function tests if all character arguments are different
values. T is returned if the
arguments are of different ASCII
value, NIL otherwise. In the case of two
arguments, this has the effect of testing if 'char1' is not equal to
'char2'. This test is case sensitive, the character '#\a' is different and
of greater ASCII value than the
character '#\A'.
Examples
(char/= #\a #\b) => T
(char/= #\a #\b #\c) => T
(char/= #\a #\a) => NIL
(char/= #\a #\b #\b) => NIL
(char/= #\A #\a) => T
(char/= #\a #\A) => T
Caution: If you type 'char\=' [with a backslash] instead of
'string/=' by mistake, no error will be signalled because backslash is the
single escape character and the XLISP reader will evaluate 'char\=' as
char=, but the meaning of the test is
exactly reversed.
See also:
Back to Top
Nyquist / XLISP 2.0 -
Contents |
Tutorials |
Examples |
Reference