DOCUMENTATION CENTER SEARCH
Mathematica
>
Display of Numbers
>
Built-in
Mathematica
Symbol
Generating C and Fortran Expressions
Forms of Input and Output
Tutorials »
|
CForm
Compile
See Also »
|
Display of Numbers
More About »
FortranForm
FortranForm
[
expr
]
prints as a Fortran language version of
expr
.
MORE INFORMATION
Standard arithmetic functions and certain control structures are translated.
FortranForm
acts as a "wrapper", which affects printing, but not evaluation.
The width of output lines must be set explicitly by giving the option
PageWidth
->
n
for the relevant output stream.
SetOptions
[
$Output
,
PageWidth
->72]
uses a line width of 72 characters for standard
Mathematica
output.
No declarations are generated.
EXAMPLES
CLOSE ALL
Basic Examples
(1)
A Fortran language version of a polynomial:
In[1]:=
Out[1]//FortranForm=
A mixed numeric and symbolic expression:
In[2]:=
Out[2]//FortranForm=
Scope
(1)
Applications
(1)
Properties & Relations
(2)
Possible Issues
(1)
SEE ALSO
CForm
Compile
TUTORIALS
Generating C and Fortran Expressions
Forms of Input and Output
MORE ABOUT
Display of Numbers
New in 1
© 2008 Wolfram Research, Inc.