Basic Examples (2)
Basic Examples
(2)
Convert a string into boxes:
In[1]:=
Out[1]=
RowBox[{RowBox[{f,[,x_,]}],:=,RowBox[{x,+,1}]}]
View the :
In[2]:=
DisplayForm[%]
Out[2]//DisplayForm=
f[x_]:=x+1
View as an input cell:
In[3]:=
CellPrint[Cell[BoxData[%%],"Input"]]
f[x_]:=x+1
———
The string does not need to be valid syntax:
In[1]:=
Out[1]=
RowBox[{RowBox[{f,[,x_,]}],:=}]
In[2]:=
DisplayForm[%]
Out[2]//DisplayForm=
f[x_]:=
Scope (3)
Scope
(3)
Options (2)
Options
(2)