print
pretty-printing of expressions
Calling Sequence
Parameters
Description
Examples
print(e1, e2, ...)
print[n](e1, e2, ...)
e1, e2, ...
-
any expressions
n
optional override for prettyprint interface variable
The function print displays the values of the expressions appearing as arguments and returns NULL as the function value. The expressions printed are separated by a comma and a space. Note that print('``') prints a blank line. The ditto commands, %, %%, and %%% do not recall the output of the print command, since the return value of the function is NULL.
The following user interface variables control the format. See interface for setting user interface variables.
The user interface variable prettyprint is checked to determine the format in which the expressions are to be printed. For details, see interface.
The user interface variable verboseproc is checked to determine how the body of Maple procedures (that is, the code) is to be displayed. It can be displayed in full, with indentation, or abbreviated to simply ``...''. By default user procedures are displayed in full, and Maple library procedures are abbreviated.
The user interface variable screenwidth specifies the number of characters that fit on the output device being used. The default value is 79.
The user interface variable labelling (or labeling) enables the use of %N variables to reduce the size of the output. These %N labels identify common subexpressions (those appearing more than once) in the output.
Calling print[N] instead of print where N is an integer between -2 and 3, temporarily overrides the prettyprint interface variable. For example, print[0](expr) is equivalent to lprint(expr).
The evaluation of arrays, tables, procedures, and operators is different from other objects in that when assigned to a name, they normally print with simply the name. For example, if the name A has been assigned 123 then A; displays A. To print the array object in full use print(A); (when prettyprint >= 0) or eval(A);.
There is a limited facility for user-defined formatting of functions. For example, if the user assigns
`print/complex` := proc(real,imag) real + 'j'*imag end
then during output of the value complex(2, 3), the `print/complex` procedure is called with the arguments 2, 3 resulting in the value 2+3⁢j, which is displayed as 2+3⁢j. Note that arguments are formatted first, and alias substitutions take place after formatting is completed.
print⁡red,rouge,rot
red,rouge,rot
lprint⁡red,rouge,rot
red, rouge, rot
v≔array⁡1,2,3:
v
print⁡v
?
lprint⁡v
sin
print⁡sin
procx::algebraic...end proc
print⁡sin⁡0
0
lprint⁡sin
When called within the output process, the result of `print/foo` is not prettyprinted automatically. You must explicitly call the corresponding routine for prettyprinting Matrices using `print/rtable` or print_preprocess.
`print/foo`:=proc(x) `print/rtable`(Matrix([[x,0],[0,1]])) end proc:
foo⁡0
foo⁡x
lprint⁡foo⁡x
foo(x)
print⁡foo⁡x
See Also
alias
interface
lprint
printf
save
sort
writeto
Download Help Document