Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > Procedural Programming > Basic Input & Output in Programs >

Print

Print[expr]
prints expr as output.
  • In a notebook, Print generates a cell with style "Print".
  • Print can print any expression, including graphics and dynamic objects.
  • Print[expr1, expr2, ...] prints expri concatenated together, effectively using Row. »
  • With a text-based interface, Print ends its output with a single newline (line feed).
  • You can arrange to have expressions on several lines by using Column.  »
  • Print uses the format type of $Output as its default format type.
Print x+y, then print a+b:
Print the first 5 primes:
Print x+y, then print a+b:
 
Print the first 5 primes:
Print graphics:
Print a column of expressions:
Print normally prints in StandardForm, so strings do not have quotes:
Print in InputForm:
Print in TraditionalForm:
Print in a specified style:
Print active controls:
Print a button:
Print several expressions concatenated together:
Print Mersenne primes as soon as they are found:
Print a sequence of graphics:
The actual expression returned by Print is Null:
New in 1 | Last modified in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team