Macaulay2 » Documentation
Packages » Macaulay2Doc > The Macaulay2 language > strings and nets > String > toExternalString
next | previous | forward | backward | up | index | toc

toExternalString -- convert to a readable string

Synopsis

Description

See also toString which simply converts x to a string that can be displayed meaningfully.
i1 : toString {1,4,a,f,212312,2.123243242}

o1 = {1, 4, a, f, 212312, 2.12324}
i2 : R = QQ[x_1..x_5];
i3 : toExternalString R

o3 = QQ[x_1..x_5, Degrees => {5:1}, Heft => {1}]
Matrices and ring elements are linearized
i4 : x_1^3-3/4*x_5*x_3

      3   3
o4 = x  - -x x
      1   4 3 5

o4 : R
i5 : toExternalString oo

o5 = x_1^3-(3/4)*x_3*x_5
i6 : value oo

      3   3
o6 = x  - -x x
      1   4 3 5

o6 : R

Caveat

Not everything can be converted to a string in such a way that it can be read back into the program later.

See also

For the programmer

The object toExternalString is a method function with a single argument.