From: Pascal Saremsky
Subject: readtable-case
Date: 
Message-ID: <80hk0d$nod$1@newsmaster.cc.columbia.edu>
Hi,

I've typed in section 23.1.2.1 (Examples of Effect of Readtable Case on the
Lisp Reader) from the Common Lisp Hyperspec, which goes as follows (I just
took out one format call to save space):

 (defun test-readtable-case-reading ()
   (let ((*readtable* (copy-readtable nil)))
     (dolist (readtable-case '(:upcase :downcase :preserve :invert))
       (setf (readtable-case *readtable*) readtable-case)
       (dolist (input '("ZEBRA" "Zebra" "zebra"))
         (format t "~&:~A~16T~A~24T~A"
                 (string-upcase readtable-case)
                 input
                 (symbol-name (read-from-string input)))))))

which should return:

    :UPCASE         ZEBRA   ZEBRA
    :UPCASE         Zebra   ZEBRA
    :UPCASE         zebra   ZEBRA
    :DOWNCASE       ZEBRA   zebra
    :DOWNCASE       Zebra   zebra
    :DOWNCASE       zebra   zebra
    :PRESERVE       ZEBRA   ZEBRA
    :PRESERVE       Zebra   Zebra
    :PRESERVE       zebra   zebra
    :INVERT         ZEBRA   zebra
    :INVERT         Zebra   Zebra
    :INVERT         zebra   ZEBRA

But instead I get:

:UPCASE         ZEBRA   ZEBRA
:UPCASE         Zebra   ZEBRA
:UPCASE         zebra   ZEBRA
:DOWNCASE       ZEBRA   ZEBRA
:DOWNCASE       Zebra   ZEBRA
:DOWNCASE       zebra   ZEBRA
:PRESERVE       ZEBRA   ZEBRA
:PRESERVE       Zebra   ZEBRA
:PRESERVE       zebra   ZEBRA
:INVERT         ZEBRA   ZEBRA
:INVERT         Zebra   ZEBRA
:INVERT         zebra   ZEBRA

I.e., everything in upper case regardless.  I'm using Harlequin LispWorks.

Any ideas?

Thanks

-Pascal

From: Arthur Lemmens
Subject: Re: readtable-case
Date: 
Message-ID: <382D2A6C.727ADFAE@simplex.nl>
Pascal Saremsky wrote:

> I've typed in section 23.1.2.1 (Examples of Effect of Readtable Case on the
> Lisp Reader) from the Common Lisp Hyperspec, which goes as follows 
> 
> [cut]
> 
> which should return:
> 
> [cut]

> But instead I get:
> 
> [cut]
>
> I.e., everything in upper case regardless.  I'm using Harlequin LispWorks.

My version of Lispworks (Lispworks for Windows 4.1.18) returns exactly what
it should return according to the spec.
What version are you using?

Arthur Lemmens
From: Pascal Saremsky
Subject: Re: readtable-case
Date: 
Message-ID: <80k4eg$ppa$1@newsmaster.cc.columbia.edu>
Arthur,

I'm using LispWorks Personal Edition Version 4.1.0 on Windows98.   Perhaps
I've permanently altered an internal variable (is that possible?), and I
ought to reinstall the whole system? Or, perhaps they've fixed a bug between
4.1.0 and 4.1.18, and I should reinstall anyway.

-Pascal

Arthur Lemmens wrote in message <·················@simplex.nl>...

>
>My version of Lispworks (Lispworks for Windows 4.1.18) returns exactly what
>it should return according to the spec.
>What version are you using?
>
>Arthur Lemmens
>
From: Arthur Lemmens
Subject: Re: readtable-case
Date: 
Message-ID: <382DB28C.38A0659D@simplex.nl>
Pascal Saremsky wrote:

> Or, perhaps they've fixed a bug between 4.1.0 and 4.1.18, and I should 
> reinstall anyway.

That's what it looks like. 

I tried your code on version 4.0.1, and it went wrong in the way you 
described. Then I ran (scm:print-patch-load-history) in 4.1.18, which gave 
the following entry:
- loaded public patch SYSTEM 1.123
     Make the reader understand the readtable case of a readtable in LWW.

Arthur
From: Pascal Saremsky
Subject: Re: readtable-case
Date: 
Message-ID: <80qmr8$64k$1@newsmaster.cc.columbia.edu>
Hi all,

If anybody cares: I reported the bug with Harlequin. They acknowledged that
it is a bug with the Personal edition and that they do not provide patches
for it, but that it works in the Enterprise or Professional edition.

-Pascal