[Openmcl-devel] make-symbol with uppercase/lowercase strings --

Dave Cooper david.cooper at genworks.com
Mon Jan 14 14:26:37 PST 2013


> >
> >  CL-USER> (make-symbol "heynow")
> > #:|heynow|
> > CL-USER> (make-symbol "HEYnOW")
> > #:HEY\nOW
> > CL-USER> (make-symbol "HEYnoW")
> > #:|HEYnoW|
>
> Which part of above bothers you?  CCL is making symbols with name
> you gave it.  To print them correctly some escaping (either
> vertical bars or backslahes) is needed.  Apparently CCL chooses
> shortest correct form, with ties in favour of bars -- in your
> case uses backslash when only one character needs escaping
> but bars otherwise.
>
>
None of it particularly bothers me. I was just wondering if there was some
kind of pattern I was missing here.

CL-USER> (make-symbol "AAbBABABaBABBAcBA")
#:AA\bBABAB\aBABBA\cBA

So it doesn't look like it's as simple as the shortest correct form.

I tried looking at CCL's source for make-symbol, but it lost me at
symvector->symptr...

Anyway it's enough to know that both printed representations are correct...
so I'll go ahead and make my code deal with that.

Thank you.


-- 
My Best,

Dave Cooper, Genworks Support
david.cooper at genworks.com, dave.genworks.com(skype)
USA: 248-327-3253(o), 1-248-330-2979(mobile)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20130114/6a8563f9/attachment.htm>


More information about the Openmcl-devel mailing list