[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: upper and lower case code



Dan Stanger wrote:
> 
> i have a program where a function is called with mixed case symbols
> for example
> (f 'And 'Holdall)
> clisp seems to upcase it.  it works correctly if i enclose it in bars.
> (f '|And| '|Holdall|)
> is there a way to have clisp recognize the case of symbols?
> thanks,
> dan stanger

That is because clisp is case-insensitive, and treats all its symbols as
uppercase, *unless* they are specified to be treated as special
characters, as lowercases, spaces etc. This is done by placing a \ in
front of that character, or surrond a sequence of characters with | as
you have done.

You can recognize the case of characters with the predicates
upper-case-p and lower-case-p.

-- 
------ <<<<<<< ((((((( OOOOOOOOOO ))))))) >>>>>>> ------
		      Jonas Kvist
Bjornkarrsgatan 13A:13         Phone: +46 (0)13 17 74 28
582 51  Linkoping        E-mail: c93jonkv@und.ida.liu.se
Sweden         URL: http://www-und.ida.liu.se/~c93jonkv/