up previous next
convert to a string
sprint(E: OBJECT): STRING
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.
/**/ use R ::= QQ[x,y];
/**/ I := ideal(x,y);
/**/ J := sprint(I);
/**/ J; -- The output for I and J looks the same, but ...
/**/ type(I); -- I is an ideal, and
/**/ type(J); -- J is just the string "ideal(x, y)".
/**/ J; -- the 1st character of J
/**/ J; -- the 2nd character of J
/**/ len(J); -- J has 11 characters