1 @c -----------------------------------------------------------------------------
3 @c License : GNU General Public License (GPL)
5 @c Original : f90.texi revision 21.08.2011
7 @c Revision : 21.08.2011
9 @c This file is part of Maxima -- GPL CAS based on DOE-MACSYMA
10 @c -----------------------------------------------------------------------------
13 * Functions and Variables for f90::
16 @c -----------------------------------------------------------------------------
17 @node Functions and Variables for f90, , f90, f90
18 @section Functions and Variables for f90
19 @c -----------------------------------------------------------------------------
21 @c -----------------------------------------------------------------------------
23 @deffn {Function} f90 (@var{expr_1}, @dots{}, @var{expr_n})
25 Prints one or more expressions @var{expr_1}, @dots{}, @var{expr_n}
26 as a Fortran 90 program.
27 Output is printed to the standard output.
29 @code{f90} prints output in the so-called "free form" input format for
31 there is no special attention to column positions.
32 Long lines are split at a fixed width with the ampersand @code{&} continuation
35 @code{load("f90")} loads this function. See also the function @mrefdot{fortran}
41 (%i2) foo : expand ((xxx + yyy + 7)^4);
43 (%o2) yyy + 4 xxx yyy + 28 yyy + 6 xxx yyy + 84 xxx yyy
45 + 294 yyy + 4 xxx yyy + 84 xxx yyy + 588 xxx yyy + 1372 yyy
47 + xxx + 28 xxx + 294 xxx + 1372 xxx + 2401
48 (%i3) f90 ('foo = foo);
49 foo = yyy**4+4*xxx*yyy**3+28*yyy**3+6*xxx**2*yyy**2+84*xxx*yyy**2&
50 +294*yyy**2+4*xxx**3*yyy+84*xxx**2*yyy+588*xxx*yyy+1372*yyy+xxx**&
51 4+28*xxx**3+294*xxx**2+1372*xxx+2401
56 Capture standard output into a file via the @mref{with_stdout} function.
60 (%i2) foo : sin (3*x + 1) - cos (7*x - 2);
61 (%o2) sin(3 x + 1) - cos(7 x - 2)
62 (%i3) with_stdout ("foo.f90",
63 f90 (x=0.25, y=0.625, 'foo=foo, 'stop, 'end));
65 (%i4) printfile ("foo.f90");
68 foo = sin(3*x+1)-cos(7*x-2)
75 @c --- End of file f90.de.texi -------------------------------------------------