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.
Aha. But in PrimitiveArray we have Qnew ==> MAKE_-ARRAY$Lisp Qnew1 ==> MAKEARR1$Lisp empty() == Qnew(0$Lisp) new(n, x) == Qnew1(n, x) https://github.com/hemmecke/fricas-svn/blob/master/src/algebra/array1.spad.pamphlet#L22 So at least we have arrays possibly occuring. > If vectors gets here, then probably caller is wrong. Indeed OneDimensionalArrayAggregate transforms that into a list for OutputForm, but it's unclear whether an Array still cannot occur. Perhaps it comes back through some error message during a failed compilation? I feel unable to really test that, in other words, I guess VECP has the be kept in the SPAD code until it is really clear that this case doesn't appear. Maybe we can add a message that tells a user to report if this branch is selected. 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? Ralf -- 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.
