On Tue, May 17, 2022 at 08:50:26AM +0200, Ralf Hemmecke wrote:
> I was actually looking for a simpler way to display 1D output (Format1D).
> 
> It can be easily done via
> 
> print1D x ==> display((x::OutputForm)::Formatter(Format1D))
> 
> Studying whether we can sensibly include such a function into FriCAS
> (not the topic of the mail), I stumpled over "PrintPackage".
> 
> PrintPackage() : with
>     print : OutputForm ->  Void
>       ++ print(o) writes the output form o on standard output using the
>       ++ two-dimensional formatter.
>  == add
>     print(x) == print(x)$OutputForm
> 
> I somehow fail to see what advantage it has. Why another "print" function if
> eventually, a value of any type has to be converted to OutputForm anyway and
> so print$OutputForm could be used directly?

IIUC the idea is that exposing OutputForm exposes several functions
which are irrelevant to printing.  So, this is little helper to
make use of 'print' more tidy.  Of course, one can discuss if
gain is worth the code.  Here I am just trying to reverse-engineer
the rationale.
 
> Also the SpecialOutputPackage is somewhat useless.
> 
> 
> (215) -> outputAsScript("foo"::OutputForm)
> 
>    >> System error:
>    The function BOOT::|formulaFormat| is undefined.
> 
> (215) -> outputAsFortran("foo"::OutputForm)
> 
>    >> System error:
>    The function BOOT::|dispfortexp| is undefined.
> 
> (215) -> outputAsFortran(42::OutputForm)
> 
>    >> System error:
>    The function BOOT::|dispfortexp| is undefined.

This could be easily fixed.  OTOH nobody complained in several
years, so number of users must be limited...

> Although DisplayPackage is used in view2D and view3D it may also be a
> candidate for removal in the future.

Actually, there is question if we should improve it or replace.  Several
folks wanted/used similar functionality in different ways.  It would
be good to have single place providing needed support.

-- 
                              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 view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/20220517144503.GB30133%40fricas.math.uni.wroc.pl.

Reply via email to