More info about this:
> 
> On 03/26/2014 03:05 AM, Waldek Hebisch wrote:
> > Ralf Hemmecke wrote:
> >> 
> >> outputTran contains something like this...
> >> 
> >> VECP x => outputTran ['BRACKET,['AGGLST,:[x.i for i in 0..MAXINDEX
> >> x]]]
> >> 
> >> In order to translate that into spad I need to be able to deal
> >> with arrays in OutputForm.
> > 
> > I would first check it that case is used at all.  I do not think 
> > algebra produces such thing as OutputForm.

We can get vectors via SExpression.  But I am not sure if handling
them in 'outputTran' will do any good.  Namely, all elements of
vector are raw Lisp values.  The best we can do is to pass them
to Lisp printer.  Leaving vector as is will cause exactly that.
OTOH, the code above will try to interpret raw Lisp values as
OutputForm-s, which are likely to cause trouble.

One more thing releated to this: outputTran has special case
for handling Lisp representationof  matrices in 'outputTranMatrix'.
But this code can not work, because we use different representation
of matrices (true 2D arrays instead of vectors of vectors).

> As far as I have understood i-output.boot, it looks as if that is used
> not only for algebra output, but also to print general domain
> expressions. Why else would I see something like "return" or this
> 
>   op = 'LAMBDA_-CLOSURE => 'Closure
>   op = 'IF       => outputTranIf x
>   op = 'COLLECT  => outputTranCollect x
>   op = 'REDUCE   => outputTranReduce x
>   op = 'REPEAT   => outputTranRepeat x
>   op = 'SEQ      => outputTranSEQ x
> 
> in outputTran?

Interpreter calls 'mathprint' to print code of user functions.
AFAICS 'outputTran' works a coercion to OutputForm for
interpreter functions.  We probably should modify interpreter
so that interpreter values get transformed to proper
OutputForm before calling 'mathprint'.

-- 
                              Waldek Hebisch
[email protected] 

-- 
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 http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to