Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • $\begingroup$ 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. $\endgroup$ Commented Jul 30, 2017 at 4:13
  • $\begingroup$ @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? $\endgroup$ Commented Jul 30, 2017 at 4:18
  • $\begingroup$ 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. $\endgroup$ Commented Jul 30, 2017 at 4:19