up previous next
sprint    --    convert to a string


Syntax
sprint(E: OBJECT): STRING

Description
This function takes any CoCoA expression and converts its value to a string. One use is to check for extremely long output before printing in a CoCoA window; see also fold .

Example
/**/  use R ::= QQ[x,y];
/**/  I := ideal(x,y);
/**/  J := sprint(I);
/**/  I;
ideal(x, y)

/**/  J;        -- The output for I and J looks the same, but ...
ideal(x, y)
/**/  type(I);  -- I is an ideal, and
IDEAL
/**/  type(J);  -- J is just the string "ideal(x, y)".
STRING

See Also