This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)


Write[channel, expr1, expr2, ...]
writes the expressions expri in sequence, followed by a newline, to the specified output channel.
  • The output channel can be a single file or pipe, or list of them, each specified by a string giving their name, or by an OutputStream object.
  • Write is the lowest-level Mathematica output function. Functions like Print and Message are defined in terms of it.
  • If any of the specified files or pipes are not already open, Write calls OpenWrite to open them.
  • Write does not close files and pipes after it finishes writing to them.
  • By default, Write generates output in the form specified by the setting of the FormatType option for the output stream used.
New in 1