char=?(3scm) Scheme Programmer's Manual char=?(3scm)

char=?, char<?, char>?, char<=?, char>=? - character comparison

(import (rnrs))                     ;R6RS
(import (rnrs base))                ;R6RS
(import (scheme r5rs))              ;R7RS
(import (scheme base))              ;R7RS

(char=? char char char ...)
(char<? char char char ...)
(char>? char char char ...)
(char<=? char char char ...)
(char>=? char char char ...)

These procedures return #t if the results of passing their arguments to char->integer are (respectively): equal, monotonically increasing, monotonically decreasing, monotonically nondecreasing, or monotonically nonincreasing, and #f otherwise.

In R6RS systems, these procedures impose a total ordering on the set of characters according to their Unicode scalar values.

Returns a single boolean value.

(char<? #\z #\ß)  =>  #t
(char<? #\z #\Z)  =>  #f

Both R6RS and R7RS define the order based on the Unicode scalar values of characters, but R7RS not require full Unicode support and also permits non-Unicode characters.

These procedures exist in R5RS and earlier reports, but they were only required to support two arguments.

IEEE Scheme uses the ≤ and ≥ characters instead of <= and >= in the procedure entries, but this is probably a typo.

This procedure can raise exceptions with the following condition types:
&assertion (R6RS)
The wrong number of arguments was passed or an argument was outside its domain.
R7RS
The assertions described above are errors. Implementations may signal an error, extend the procedure's domain of definition to include such arguments, or fail catastrophically.

char-ci=?(3scm)

R4RS, IEEE Scheme, R5RS, R6RS, R7RS

This page is part of the scheme-manpages project. It includes materials from the RnRS documents. More information can be found at https://weinholt.se/scheme/manpages/.

2021-02-20