This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

FortranForm

FortranForm[expr]
prints as a Fortran language version of expr.
  • 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.
  • No declarations are generated.
New in 1