Small CS bug



On Wed, 2004-11-24 at 08:34, Raymond Toy wrote:
> >>>>> "James" == James Amundson <amundson@users.sourceforge.net> writes:
> 
> 
>     James> The primary source of confusion here is the difference between Lisp
>     James> strings and Maxima "strings." When I enter 
>     James> 	foo:"bar";
>     James> in Maxima, the value of $FOO becomes &BAR in Lisp. When I enter
>     James> 	(setf $foo "bar")
>     James> in Lisp, the value of $FOO becomes "bar". 
> 
> Yes, I believe that's right.
> 
>     James> It seems to me that the consistent way to treat the case of strings is
>     James> to require that they always be appropriate for their context, i.e.,
>     James> case-preserved strings in Lisp, case-inverted strings in Maxima. By that
>     James> argument merror, which is a lisp function, would continue to take a
>     James> string argument (sstring) with unmodified case, but the line where that
>     James> string becomes part of a maxima expression,
>     James> 	(setq $error `((mlist) ,sstring ,@ l))
>     James> would be modified to invert the case of sstring.
> 
>     James> How does that sound?
> 
> Actually, that was my first attempt at fixing that particular example.

OK. As I suspected, you are way ahead of me.

> However it's a bit tricky.  If the string contains maxima format
> specifiers like ~M, it seems it must be upper case.  

Oh. Yuck.

> We can probably
> fix that.

Yes, we should.

> In addition, in $errormsg and friends, maxima pulls apart the string
> and then calls maknam on various parts of it which is then intern'ed.
> This makes it somewhat hard to tell if the string should be upcased,
> downcased, or what.  I haven't figured out how it knows what parts of
> the string to pull apart.
> 
> I only fixed the maknam issue.

Thanks for explaining the problem. I will (continue) to look at this,
too.

> I've been looking at other merror messages.  They seem to be ok, but
> there are sooo many and I've only looked at a few.

I am in the process of methodically inspecting and modifying each string
containing one or more sequences of upper-case characters in the src
directory. I had hoped to be done by today, but it is taking longer than
I thought -- even though I wrote a little program to assist me, there
are a huge number of strings to examine. I'll be out of town for a few
days, but I should be able to commit the results soon after I return.

--Jim