prints as a Fortran language version of expr.
- Standard arithmetic functions and certain control structures are translated.
- When an input evaluates to FortranForm[expr], FortranForm does not appear in the output. »
- 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 Wolfram Language output.
- No declarations are generated.
Examplesopen allclose all
Basic Examples (1)
Properties & Relations (2)
Possible Issues (2)
Even when an output omits FortranForm from the top level, it is not stripped from subexpressions:
The output does not have FortranForm in it:
However, the variable e does have FortranForm in it, which may affect subsequent evaluations:
The product is not evaluated due to the intervening FortranForm:
Assign variables first and then apply FortranForm to the result to maintain computability:
Wolfram Research (1988), FortranForm, Wolfram Language function, https://reference.wolfram.com/language/ref/FortranForm.html.
Wolfram Language. 1988. "FortranForm." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FortranForm.html.
Wolfram Language. (1988). FortranForm. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FortranForm.html