Ralf Hemmecke wrote:
> 
> Thank you, Waldek for this explanation.
> 
> >> Better would perhaps be
> >>
> >>   sayTeX(x) == sayString(x)
> 
> > Well, we need to untangle usage of streams first.  Currently
> > we have a lot of redirections in various ways.  Some redirections
> > probably are useless or evan harmful.  But most is necessary to
> > ensure that output goes to correct stream.  This redirection
> > code is tangled with low level formatting code.
> 
> OK, sayString(x) is wrong. (Well, I later realized, that sayNewLine()
> was missing.) But anyway, it goes to the wrong stream.
> 
> What about
> 
>   sayTeXStream(x, $fricasOutput) ==
>       sayString(x)
>       sayNewLine()
>       FORCE_-OUTPUT $fricasOutput
> 
>   sayTeX(x) == if x then sayTeXStream(x, $texOutputStream)
> 
> then?

Looks wrong for me:

1) sayString seem to normally get string as an argument.
   AFAICS sayTeX may get list of stings.
2) there are more redirections than just using $fricasOutput

> 
> sayTeX does only appear in a few files.
> 
> grep -R sayTeX * |grep -v -- '--.*sayTeX'
> src/interp/msgdb.boot:sayTeX(x) == sayBrightly1(x, $texOutputStream)
> src/algebra/export3D.spad:        sayTeX$Lisp "Can't write point or
> curve to OBJ file"
> src/algebra/clifford.spad:              sayTeX$Lisp concat ["rcProdTerm:
> ",s1,s2,s3,s4]
> src/algebra/clifford.spad:            sayTeX$Lisp concat ["rcProdTerm:
> ",s1,s2,s3,s4]
> src/algebra/clifford.spad:            sayTeX$Lisp concat
> ["cliffordProdTerm: ",s1,s2,s3,s4]
> src/algebra/mathml.spad:        sayTeX$Lisp mathML.u
> src/algebra/mathml.spad:        sayTeX$Lisp mathML.u
> src/algebra/mathml.spad:        sayTeX$Lisp mathML.u
> 
> My feeling is that a call to sayTeX in any other spad file than tex.spad
> is wrong usage, i.e. a bug.

Yes.  They are used for debugging, and better form is

  sayMsg ==> sayBrightly$Lisp

and using sayMsg instead of sayTeX

-- 
                              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