# What is the difference between the second argument of ToString and its option FormatType?

Is there any real difference between ToString[expr, form] and ToString[expr, FormatType→form]?

In all my examples, they seem to be the same. I would like to know why there are both possibilities of controlling the output. Does anyone know if there is a use for using both the second argument and the option at the same time?

• Presumably the Option form is the actual implementation and the second argument version unravels to it. Consider: SetOptions[ToString, FormatType -> CForm] (note that this causes some funky output effects. Reset it by replacing CForm with OutputForm). Although the second argument does seem to take precedence over the option version. Good find. Jul 30, 2017 at 4:13
• @b3m2a1 I tried SetOptions[ToString, FormatType -> CForm], but nothing funky happened. ToString just converts everything to CForm normally (Mathematica 10.3 Mac OS X 10.10). Maybe I'm missing something? Jul 30, 2017 at 4:18
• The funkiness I found was in things like the output labels and presumably that will propagate through anywhere a bare ToString is used. Just a preemptive warning to anyone trying that and later being confused as to why things are displaying differently from expected. Jul 30, 2017 at 4:19

There is no difference between using a secong argument which is a member of \$PrintForms and using the option FormatType. If the second argument is used, the option value is ignored.
The reason both exist is historical. In V1 and V2, ToString had no second argument, and its options were documented to be equal to that of OpenAppend. In V3, the second argument was added. This is partly because it was by far the most important option that could be given to ToString, and also that OpenAppend started having options that really didn't make sense for ToString (e.g., BinaryFormat). While the documentation continued to state for many versions that it could take all the options of OpenAppend, all the "new" options were silently ignored.