up previous next
StarPrint

print polynomial with *'s for multiplications
Syntax

StarPrint(F:POLY):NULL
StarPrintFold(F:POLY, LineWidth:INT)


Description
These functions print the polynomial F with asterisks added to denote multiplications. They may be useful when cutting and pasting from CoCoA to other mathematical software (Gap, Maple, Macaulay, Singular,..). StarPrint inserts newline characters (only between terms) to avoid lines much longer than about 70 characters. If a different approximate maximum length is desired this may be specified as the second argument to StarPrintFold; a negative value means no line length limit.

Example
  Use R ::= QQ[x,y];
  F := x^3+2xy-y^2;
  StarPrint(F);
1*x^3+2*x*y-1*y^2
-------------------------------
  StarPrintFold(F,0); -- this will print one term per line
1*x^3
+2*x*y
-1*y^2
-------------------------------


See Also