Skip to content

Commit

Permalink
Fortran tweaks
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@85739 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
ripley committed Dec 27, 2023
1 parent e47d159 commit 80d1df2
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions doc/manual/R-exts.texi
Original file line number Diff line number Diff line change
Expand Up @@ -6467,11 +6467,11 @@ Another build for Windows which may be sufficiently compatible with
@node Portable Fortran code, Binary distribution, Portable C and C++ code, Writing portable packages
@subsection Portable Fortran code

Until recently almost all known @R{} platforms used @command{gfortran}
For many years almost all known @R{} platforms used @command{gfortran}
as their Fortran compiler, but now there are LLVM and `classic'
@command{flang} and the Intel compilers
@command{ifort}@footnote{announced to be discontinued in 2023.} and
@command{ifx} are free-of-change.
@command{ifort}@footnote{discontinued in 2023.} and @command{ifx} are now
free-of-change.

There is still a lot of Fortran code in @acronym{CRAN} packages which
predates Fortran 77. Modern Fortran compilers are being written to
Expand Down Expand Up @@ -6504,8 +6504,8 @@ such as dimensions.
@noindent
Unfortunately this flags extensions such as @code{DOUBLE COMPLEX} and
@code{COMPLEX*16}. @R{} has tested that @code{DOUBLE COMPLEX} works and
so is preferred to -@code{COMPLEX*16}. (One can also use something like
-@code{COMPLEX(KIND=KIND(0.0D0))}.)
so is preferred to @code{COMPLEX*16}. (One can also use something like
@code{COMPLEX(KIND=KIND(0.0D0))}.)

GNU Fortran 10 and later give a compilation error for the previously
widespread practice of passing a Fortran array element where an array is
Expand Down Expand Up @@ -6552,6 +6552,12 @@ Use of extensions @file{.F} and @code{.F90} to indicate source code to
be preprocessed: the preprocessor used is compiler-specific and may or
may not be @command{cpp}.

@item
Fixed form Fortran (with extension @file{.f}) should only use 72
columns, and free-form at most 132 columns. This includes trailing
comments. Over-long lines may be silently truncated or give a warning.
%% The Intel compilers warn.

@end itemize


Expand Down

0 comments on commit 80d1df2

Please sign in to comment.