Mathematica 9 is now available

ToString

Usage

ToString[expr] 给出相应于OutputFormexpr的显示形式的字符串。
ToString[expr, form] 给出相应于以指定形式输出的字符串。


Notes

ToString 支持和OpenAppend相同的选项集合,有缺省设置FormatType -> OutputForm, PageWidth -> Infinity, TotalWidth -> Infinity.
ToString 使用对FormatMakeBoxes给出的任何相关定义。
• 参见Mathematica 全书: 2.8.3.
Further Examples

This generates a string from the (evaluated) expression.

In[1]:=  

Out[1]=

In[2]:=  

Out[2]//FullForm=

In[3]:=  



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.