Commit 670026fb by Paul Thomas

Update of gfortran.info to describe extensions to the standard for namelist io.

From-SVN: r98622
parent 0c0266d2
...@@ -459,7 +459,6 @@ Usable with bugs: ...@@ -459,7 +459,6 @@ Usable with bugs:
@itemize @minus @itemize @minus
@item Formatted sequential ('T' edit descriptor, and others) @item Formatted sequential ('T' edit descriptor, and others)
@item Namelist (can read a namelist that it writes, but not free-form)
@end itemize @end itemize
Not recommended: Not recommended:
...@@ -574,9 +573,6 @@ Set precision for fp units that support it (i387). ...@@ -574,9 +573,6 @@ Set precision for fp units that support it (i387).
Variables for setting fp rounding mode. Variables for setting fp rounding mode.
@item @item
Support old style namelists ending in $end or &end.
@item
Variable to fill uninitialized variables with a user-defined bit Variable to fill uninitialized variables with a user-defined bit
pattern. pattern.
...@@ -627,6 +623,7 @@ meaning. ...@@ -627,6 +623,7 @@ meaning.
@menu @menu
* Old-style kind specifications:: * Old-style kind specifications::
* Old-style variable initialization:: * Old-style variable initialization::
* Extensions to namelist::
@end menu @end menu
@node Old-style kind specifications @node Old-style kind specifications
...@@ -675,6 +672,54 @@ Examples of standard conforming code equivalent to the above example, are: ...@@ -675,6 +672,54 @@ Examples of standard conforming code equivalent to the above example, are:
DATA i,j,x /1,2,3*0.,1./ DATA i,j,x /1,2,3*0.,1./
@end smallexample @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 @include intrinsic.texi
@c --------------------------------------------------------------------- @c ---------------------------------------------------------------------
@c Contributing @c Contributing
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment