Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Systems Interfaces & Deployment > File Operations > Low-Level File Operations > Write >

Write

Write
writes the expressions in sequence, followed by a newline, to the specified output channel.
  • The output channel can be a single file or pipe, or a list of them, each specified by a string giving its 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.
Open a stream:
Write to the stream:
Close the stream:
Read the file:
Open a stream:
In[1]:=
Click for copyable input
Out[1]=
Write to the stream:
In[2]:=
Click for copyable input
Close the stream:
In[3]:=
Click for copyable input
Out[3]=
Read the file:
New in 1
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF