WriteString

WriteString["file","string"]
writes to a file.

WriteString[channel,"string"]
writes to a stream or process.

WriteString[channel,expr1,expr2,]
converts the to strings, and then writes them in sequence to the specified output channel.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Write a string to a temporary file:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input

Print 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]=

Print the file:

Introduced in 1988
(1.0)
| Updated in 2003
(5.0)
Translate this page: