XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next

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 of the same ASCII value, NIL otherwise
Note: case is significant with this function

Description

The 'char=' [character-equality] function takes one or more character arguments. It checks to see if all the character arguments are equivalent.  T  is returned if the arguments are of the same ASCII value. In the case of two arguments, this has the effect of testing if 'char1' is equal to 'char2'. This test is case sensitive, the character '#\a' is different and of greater ASCII value than '#\A'.

Examples

(char= #\a #\b)      ; returns NIL
(char= #\b #\a)      ; returns NIL
(char= #\a #\b #\c)  ; returns NIL
(char= #\a #\a)      ; returns T
(char= #\a #\a #\a)  ; returns T
(char= #\a #\a #\b)  ; returns NIL
(char= #\A #\a)      ; returns NIL
(char= #\a #\A)      ; returns NIL

See the char= function in the XLISP 2.0 manual.

  Back to Top


XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next