I am trying to write a function that checks if a character is in a specific hexadecimal range.
I am trying the code shown below:
(def current \s)
(and (>= current (char 0x20)) (<= current (char 0xD7FF)))
I get the following error:
java.lang.ClassCastException: java.lang.Character cannot be cast to
java.lang.Number (NO_SOURCE_FILE:0)
I assume that the operator> = expects a number, it is trying to enter cast it.In regular java, I could just do:
(current >= 0x20) && (current <= 0xD7FF)
source
share