I wanted to check that char is a digit by comparing its code with codes of 0 and 9, presuming that the digits codes are contiguous in code table:
(let ((char ?\e))
(if (and (>= char ?\0) (<= char ?\9))
(message "aaa")
(message "bbb")))
But it doesn't work: this code returns "aaa", even though e
is not a digit.
What is wrong?