Martin R wrote:
>
> I am sorry it took so long. Attached there is a patch which appears to
> work well:
>
> (1) -> (3^2)$OUTFORM
>
> 2
> (1) 3
> Type:
> OutputForm
> (2) -> (3^2)$OUTFORM::INFORM
>
> (2) '(^ 3 2)
> Type:
> InputForm
> (3) -> interpret((3^2)$OUTFORM::INFORM)
>
> 2
> (3) 3
> Type:
> OutputForm
That is OK. But AFAICS with your code we depend on quote giving
us the right type. But it seems that this is not always so:
(11) -> interpret((1::OUTFORM)::INFORM)
(11) 1
Type: PositiveInteger
(16) -> atType((1::OUTFORM)::INFORM)$InputFormFunctions1(OUTFORM)
(16) (@ '1 (OutputForm))
Type: InputForm
(17) -> interpret(atType((1::OUTFORM)::INFORM)$InputFormFunctions1(OUTFORM))
An expression involving @ OutputForm actually evaluated to one of
type PositiveInteger . Perhaps you should use :: OutputForm .
Worse, for strings we get wrong value:
(22) -> interpret(("x"::OUTFORM)::INFORM)
(22) ""x""
Type: String
This is because coercion from strings to OutputForm adds quotes.
So minimally, one must special case coercion of OutputForm
consisting from single string.
--
Waldek Hebisch
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.