[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] Re: [fricas-devel] mathml hex(10) patch
From: |
Waldek Hebisch |
Subject: |
[Axiom-developer] Re: [fricas-devel] mathml hex(10) patch |
Date: |
Sun, 16 Dec 2007 08:33:37 -1100 (SST) |
Ralpf,
You wrote:
> Tim, Waldek,<br><br>This patch is a band-aid for the hex(10) bug.
<snip>
> @@ -1285,6 +1307,10 @@
> -- where it arises. Removed 2007-02-14
> concat(concat("<mtext>",str),"</mtext>")
> -- if we get to here does that mean it's a variable?
> + -- test for something like #\A and strip off #\
> + str.1 = char "#" and str.2 = char "\" =>
> + u : US := segment(3,len)$US
> + concat ["<mi>",str.u,"</mi>"]
> concat ["<mi>",str,"</mi>"]
> l : L E := (expr pretend L E)
> null l => blank
>
I wonder if we can get here with a string -- for string this is
clearly wrong. AFAICS the start of 'hex(10)' problem is in
the line:
stringify expr == (object2String$Lisp expr)@S
object2String converts character using _Lisp_ rules:
object2String x ==
STRINGP x => x
IDENTP x => PNAME x
NULL x => '""
PAIRP x => STRCONC(object2String first x, object2String rest x)
WRITE_-TO_-STRING x
so you get '#\A' here. I am not sure if we ever want '#\A' in
"math" output -- if no we could just use a function which would
convert characters to length 1 strings.
--
Waldek Hebisch
address@hidden