The Representation of Textual Forms

Like everything else in the Wolfram System, the textual forms of expressions can themselves be represented as expressions. Textual forms that consist of onedimensional sequences of characters can be represented directly as ordinary Wolfram System strings. Textual forms that involve subscripts, superscripts, and other twodimensional constructs, however, can be represented by nested collections of twodimensional boxes.

onedimensional stringsInputForm,FullForm, etc.
twodimensional boxesStandardForm,TraditionalForm, etc.

Typical representations of textual forms.

This generates the string corresponding to the textual representation of the expression in InputForm.
In[1]:=
Click for copyable input
Out[1]=
FullForm shows the string explicitly.
In[2]:=
Click for copyable input
Out[2]//FullForm=
Here are the individual characters in the string.
In[3]:=
Click for copyable input
Out[3]=
Here is the box structure corresponding to the expression in StandardForm.
In[4]:=
Click for copyable input
Out[4]=
Here is the InputForm of the box structure. In this form the structure is effectively represented by an ordinary string.

If you use the notebook front end for the Wolfram System, then you can see the expression that corresponds to the textual form of each cell by using the Show Expression menu item.

Here is a cell containing an expression in StandardForm.

1.gif

Here is the underlying representation of that expression in terms of boxes, displayed using the Show Expression menu item.

2.gif

ToString[expr,form]create a string representing the specified textual form of expr
ToBoxes[expr,form]create a box structure representing the specified textual form of expr

Creating strings and boxes from expressions.