CoCoA:IO.SprintTrunc

From ApCoCoAWiki
Revision as of 10:02, 24 October 2007 by XMLBot (talk | contribs) (pushing XML rev. 1.46, again)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

IO.SprintTrunc

convert to a string and truncate

Description

This function works like <ttref>Sprint</ttref>, turning the value of the

expression E into a string, but if the string has length greater than

N-1, it is truncated and the string ... is concatenated. This function is useful in formatting reports of results.

Example

  Use R ::= Q[x,y];
  I := Ideal(x,y);
  $io.SprintTrunc(I,4);
Idea...
-------------------------------

Syntax

$io.SprintTrunc(E:OBJECT,N:INT):STRING

Format

Sprint

   <type>io</type>
   <type>printing</type>
   <type>string</type>