up previous next
indent    --    prints in a more readable way


Syntax
indent(L: LIST)
indent(I: IDEAL)
indent(R: RECORD)
indent(X: OBJECT, RecursionDepth: INT)

Description
This function prints its argument splitting it into several lines: a LIST or IDEAL is printed one element per line, a RECORD one field per line.

The second optional argument is for setting the level of recursive indentation; it can be useful when printing a list of records.

Example
/**/ L := [[n,n+1] | n in [1,2,3]];
/**/ println L;
[[1, 2], [2, 3], [3, 4]]

/**/ indent(L);
[
  [1, 2],
  [2, 3],
  [3, 4]
]

/**/ indent(record[B := 1,  A := 2]);
record[
  A := 2,
  B := 1
]

See Also