Group Abstract Group Abstract

Message Boards Message Boards

0
|
8.3K Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Use NumberForm, FortranForm, CForm, and so forth in FormFunction?

Posted 9 years ago
POSTED BY: Scot Martin
3 Replies

This is because FortranForm, CForm et al are not properly functions, they don't evaluate. As a matter of fact they just change the out cell in the frontend. Same goes for InputForm, FullForm, TraditionalForm. Because of that they mostly just work in the frontend.

In order to achieve what you want you'd need to use ToString with two arguments:

In[49]:= ToString[1.23*^25, CForm]

Out[49]= "1.23e25"
POSTED BY: Carlo Barbieri
Posted 9 years ago

Fantastic answer, Carlo. Just what I needed. Grazie!

POSTED BY: Scot Martin
Posted 9 years ago
POSTED BY: Scot Martin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard