aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/gfortran.texi
diff options
context:
space:
mode:
authorArjen Markus <arjen.markus@wldelft.nl>2008-12-21 19:45:17 +0100
committerDaniel Kraft <domob@gcc.gnu.org>2008-12-21 19:45:17 +0100
commitaad9c4f437c243137f532b7b63e9aeef0821a0e2 (patch)
tree2b5dc44772db8547919e94872d63f3089cc97951 /gcc/fortran/gfortran.texi
parentb72bcb52250f696bd66949e0a84903fdbb1dd20d (diff)
downloadgcc-aad9c4f437c243137f532b7b63e9aeef0821a0e2.zip
gcc-aad9c4f437c243137f532b7b63e9aeef0821a0e2.tar.gz
gcc-aad9c4f437c243137f532b7b63e9aeef0821a0e2.tar.bz2
re PR fortran/37605 (Remarks on user manual for Gfortran)
2008-12-21 Arjen Markus <arjen.markus@wldelft.nl> Daniel Kraft <d@domob.eu> PR fortran/37605 * gfortran.texi: Fixed some typos and some minor style improvements. * intrinsic.texi: Some clarifications and typo-fixes. * invoke.texi: Better documenation of the behaviour of the -fdefault-*-8 options and some other fixes. Co-Authored-By: Daniel Kraft <d@domob.eu> From-SVN: r142866
Diffstat (limited to 'gcc/fortran/gfortran.texi')
-rw-r--r--gcc/fortran/gfortran.texi21
1 files changed, 13 insertions, 8 deletions
diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi
index 933ed45..e5b46ce 100644
--- a/gcc/fortran/gfortran.texi
+++ b/gcc/fortran/gfortran.texi
@@ -263,14 +263,13 @@ code designed to be efficiently translated and processed
by a machine such as your computer.
Humans usually aren't as good writing machine code
as they are at writing Fortran (or C++, Ada, or Java),
-because is easy to make tiny mistakes writing machine code.
+because it is easy to make tiny mistakes writing machine code.
@item
Provide the user with information about the reasons why
the compiler is unable to create a binary from the source code.
Usually this will be the case if the source code is flawed.
-When writing Fortran, it is easy to make big mistakes.
-The Fortran 90 requires that the compiler can point out
+The Fortran 90 standard requires that the compiler can point out
mistakes to the user.
An incorrect usage of the language causes an @dfn{error message}.
@@ -986,8 +985,14 @@ equivalent to the standard-conforming declaration
TYPESPEC(k) x,y,z
@end smallexample
@noindent
-where @code{k} is equal to @code{size} for most types, but is equal to
-@code{size/2} for the @code{COMPLEX} type.
+where @code{k} is the kind parameter suitable for the intended precision. As
+kind parameters are implementation-dependent, use the @code{KIND},
+@code{SELECTED_INT_KIND} and @code{SELECTED_REAL_KIND} intrinsics to retrieve
+the correct value, for instance @code{REAL*8 x} can be replaced by:
+@smallexample
+INTEGER, PARAMETER :: dbl = KIND(1.0d0)
+REAL(KIND=dbl) :: x
+@end smallexample
@node Old-style variable initialization
@subsection Old-style variable initialization
@@ -1561,9 +1566,9 @@ worth a look.
The long history of the Fortran language, its wide use and broad
userbase, the large number of different compiler vendors and the lack of
some features crucial to users in the first standards have lead to the
-existence of an important number of extensions to the language. While
+existence of a number of important extensions to the language. While
some of the most useful or popular extensions are supported by the GNU
-Fortran compiler, not all existing extensions are supported. This section
+Fortran compiler, not all existing extensions are supported. This section
aims at listing these extensions and offering advice on how best make
code that uses them running with the GNU Fortran compiler.
@@ -1617,7 +1622,7 @@ store_catalog(7).id = 7831
store_catalog(7).description = "milk bottle"
store_catalog(7).price = 1.2
-! We can also manipulates the whole structure
+! We can also manipulate the whole structure
store_catalog(12) = pear
print *, store_catalog(12)
@end example