AsMultiLine
Returns a pretty-printed possibly multi-line textual representation of an object.
Syntax
-
AsMultiLine(X)
-
X
is any object
-
Description
If X
is any object, then AsMultiLine(X)
returns a pretty-printed, possibly multi-line, textual representation of X
. This is the function that the Algosim front end uses to render output.
Most formatting directives are taken into account. Large objects are typically truncated according to the current limits.
Examples
AsMultiLine(IdentityMatrix(4))
⎛1 0 0 0⎞ ⎜0 1 0 0⎟ ⎜0 0 1 0⎟ ⎝0 0 0 1⎠
AsMultiLine('("dog", "cat", "rat", "rabbit"))
dog cat rat rabbit
AsMultiLine(date())
year: 2020 month: August day: 23
AsMultiLine(IdentityMatrix(10)\5)
⎛1 0 0 0 0 ⋯⎞ ⎜0 1 0 0 0 ⋯⎟ ⎜0 0 1 0 0 ⋯⎟ ⎜0 0 0 1 0 ⋯⎟ ⎜0 0 0 0 1 ⋯⎟ ⎝⋮ ⋮ ⋮ ⋮ ⋮ ⋱⎠