ToString
Usage
• ToString[expr] 给出相应于OutputForm中expr的显示形式的字符串。
• ToString[expr, form] 给出相应于以指定形式输出的字符串。
Notes
• ToString 支持和OpenAppend相同的选项集合,有缺省设置FormatType -> OutputForm, PageWidth -> Infinity, TotalWidth -> Infinity. • ToString 使用对Format和MakeBoxes给出的任何相关定义。 • 参见 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]:=
|
|