rfs@duke.cs.duke.edu (Robert F. Smith) (09/11/87)
If this is not the proper news group for this question, I would appreciate anyone informing me of the one I should post to. Here's my question: I am working in common lisp on a symbolics lisp machine. I need to be able to distinguish between upper and lower case letters entered from the keyboard. It seems that the lisp machine treats characters from the keyboard differently than characters stored in files (where case tests do work). Is there some trick, or some flag to set, that will allow me to test the case distinction? Thanks, in advance, Robert F. Smith -_-_-_- Robert F. Smith PHONE: (919) 684-5110 -_-_-_-_-_-_-_- Dept. of Computer Science CSNET: rfs@duke Duke University UUCP: decvax!duke!rfs _-_-_-_ Durham NC 27706-2591 USA ARPA: rfs@cs.duke.edu _-_-_-_-_-_-_-_
cogen@XN.LL.MIT.EDU (David Cogen) (09/11/87)
Posting-Front-End: GNU Emacs 18.46.1 of Fri Jun 12 1987 on xn (berkeley-unix)
In article <10224@duke.cs.duke.edu> rfs@duke.cs.duke.edu (Robert F. Smith) writes:
I am working in common lisp on a symbolics lisp machine. I need to be able
to distinguish between upper and lower case letters entered from the
keyboard. It seems that the lisp machine treats characters from the
keyboard differently than characters stored in files (where case tests do
work). Is there some trick, or some flag to set, that will allow me to test
the case distinction?
You should have no problem (I just verified it.) First, how are you reading the
characters from the keyboard? The correct way is READ-CHAR; it will return a
character object. (Do not use READ; this will read a single-character symbol,
which generally gets converted to upper case.) When you have the characters,
test using CHAR=, which respects case distinctions, or CHAR-EQUAL, which ignores
them. As far as differences between keyboard input and file input, I have never
noticed this. Could you elaborate?
(david () cogen)