aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2005-04-23 17:03:07 +0000
committerPaul Thomas <pault@gcc.gnu.org>2005-04-23 17:03:07 +0000
commit670026fb25e4989b73fcb3ff4bd7ba9364b8a649 (patch)
tree2c2bfad08379677e086bd3d46f8b03efd50247aa /gcc
parent0c0266d294e2e4728df6cb6fb21ab0fa9d178c22 (diff)
downloadgcc-670026fb25e4989b73fcb3ff4bd7ba9364b8a649.zip
gcc-670026fb25e4989b73fcb3ff4bd7ba9364b8a649.tar.gz
gcc-670026fb25e4989b73fcb3ff4bd7ba9364b8a649.tar.bz2
Update of gfortran.info to describe extensions to the standard for namelist io.
From-SVN: r98622
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/gfortran.texi53
1 files changed, 49 insertions, 4 deletions
diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi
index 9068cff..67867bc 100644
--- a/gcc/fortran/gfortran.texi
+++ b/gcc/fortran/gfortran.texi
@@ -459,7 +459,6 @@ Usable with bugs:
@itemize @minus
@item Formatted sequential ('T' edit descriptor, and others)
-@item Namelist (can read a namelist that it writes, but not free-form)
@end itemize
Not recommended:
@@ -574,9 +573,6 @@ Set precision for fp units that support it (i387).
Variables for setting fp rounding mode.
@item
-Support old style namelists ending in $end or &end.
-
-@item
Variable to fill uninitialized variables with a user-defined bit
pattern.
@@ -627,6 +623,7 @@ meaning.
@menu
* Old-style kind specifications::
* Old-style variable initialization::
+* Extensions to namelist::
@end menu
@node Old-style kind specifications
@@ -675,6 +672,54 @@ Examples of standard conforming code equivalent to the above example, are:
DATA i,j,x /1,2,3*0.,1./
@end smallexample
+@node Extensions to namelist
+@section Extensions to namelist
+@cindex Namelist
+
+@command{gfortran} fully supports the fortran95 standard for namelist io
+including array qualifiers, substrings and fully qualified derived types.
+The output from a namelist write is compatible with namelist read. The
+output has all names in upper case and indentation to column 1 after the
+namelist name. Two extensions are permitted:
+
+Old-style use of $ instead of &
+@smallexample
+$MYNML
+ X(:)%Y(2) = 1.0 2.0 3.0
+ CH(1:4) = "abcd"
+$END
+@end smallexample
+
+It should be noticed that the default terminator is / rather than &END.
+
+Querying of the namelist when inputting from stdin. After at least
+one space, entering ? sends to stdout the namelist name and the names of
+the variables in the namelist:
+@smallexample
+?
+
+&mynml
+ x
+ x%y
+ ch
+&end
+@end smallexample
+
+Entering =? outputs the namelist to stdout, as if WRITE (*,NML = mynml)
+had been called:
+@smallexample
+=?
+
+&MYNML
+ X(1)%Y= 0.000000 , 1.000000 , 0.000000 ,
+ X(2)%Y= 0.000000 , 2.000000 , 0.000000 ,
+ X(3)%Y= 0.000000 , 3.000000 , 0.000000 ,
+ CH=abcd, /
+@end smallexample
+
+To aid this dialog, when input is from stdin, errors produce send their
+messages to stderr and execution continues, even if IOSTAT is set.
+
@include intrinsic.texi
@c ---------------------------------------------------------------------
@c Contributing