For debugging, it's always good to be able to have access to underlying printing mechanism, but I think it shouldn't be encouraged to use such things in ordinary user programs.
This is, maybe, a follow-up of my critisism of OutputForm and its unclear definition. In particular output: OutputForm -> Void from OutputPackage is used in section 6.19 in the AXIOM book to nicely format the Pascal triangle. When I first read this some 15 years ago, I liked being able to format in such a form. Now, however, I'm totally against using output$OutputPackage in such a place. The reason is simple. "output" bypasses the normal output mechanism, i.e. object --(coerce)--> OutputForm --(some formatter)--> actual output it simply places everything into the algebra stream directly. :-( In other words, with )set output tex on there is (of course) no TeX part. In short, the definitions pascal(1,i) == 1 pascal(n,n) == 1 pascal(i,j | 1 < i and i < j) == pascal(i-1,j-1)+pascal(i,j-1) pascalRow(n) == [pascal(i,n) for i in 1..n] displayRow(n) == output center blankSeparate pascalRow(n) for i in 1..7 repeat displayRow i don't give TeX output. Of course, it gives output in my spool file that is generated from ug06.htex, but there is no markup whatsoever to recognize that this output should be shown in the book.tex format. Instead of working on a fix for the output, I rather think that the content of this section must be rewritten in a form that doesn't use output$OutputPackage. )set expose add constructor OutputForm pascal(1,i) == 1 pascal(n,n) == 1 pascal(i,j | 1 < i and i < j) == pascal(i-1,j-1)+pascal(i,j-1) pascalRow(n) == [pascal(i,n) for i in 1..n] displayRow(n) == center blankSeparate pascalRow n pascalTriangle(n) == vconcat [displayRow i for i in 1..n] pascalTriangle 7 Interestingly the output, doesn't look symmetric. But this comes from the fact that "center" is computed in OutputForm and not just a tag that let's the formatter decide how to center the output. That's currently wrong! And should eventually also be fixed. But currently I don't want to change OutputForm. Opinions? 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.
