This function is the primary function called upon by << to format expressions for printing. The default method provided by the system is to convert x to an Expression with expression and then to convert that to a net.
A new method for formatting expressions of class X may be installed by the user with code of the form net X := x -> .... The function provided by the user should return a net or a string.
A string is formatted by wrapping it in quotation marks and converting nonprinting characters to escape sequences. A net is formatted for printing by enclosing it in a box.
i1 : "a string" |
i2 : net "a string" |
i3 : ZZ[x]; |
i4 : x^2 |
i5 : net x^2 |
i6 : code(net,List) |
See also Net, expression, Expression, and Net.