Mathematica 9 is now available

Write

Usage

Write[channel,  ,  , ... ] 以序列形式写表达式  ,跟着一个新行,到一个指定的输出通道。


Notes

• 输出通道可以是一个单一文件或管道或它们的列表,每个都由给出它们名字或由OutputStream对象的一个串指定。
Write 是基本的Mathematica输出函数。PrintMessage根据它定义。
• 如果任何指定的文件或管道还没有打开,Write调用OpenWrite打开它们。
Write 在它完成对它们的写后并不关闭文件和管道。
• 在缺省情况下,以对使用的输出流的选项FormatType设置指定的形式产生输出。
• 参见Mathematica 全书: 2.11.3.
• 同时参见: Print, Export, Display, Message, Read, LinkWrite.
Further Examples

This open a stream to a file temps.

In[1]:=  

Out[1]=

This writes a sequence of expressions to the file.

In[2]:=  

The expressions are written in input form.

In[3]:=  


This writes another expression to the file.

In[4]:=  

The expressions from a single Write are put on the same line.

In[5]:=  


This closes the stream.

In[6]:=  

Out[6]=



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.