aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2019-03-14 17:31:18 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2019-03-14 17:31:18 +0000
commitc27722368bb7d52f6018a5d5861a7ca1b1ecdb98 (patch)
treefdab42457b09f1665469572cc07b7a5a4c29ca75
parent3ce5bdf77c33cb0b4be3fe9bd4584ce32e22b8dc (diff)
downloadgcc-c27722368bb7d52f6018a5d5861a7ca1b1ecdb98.zip
gcc-c27722368bb7d52f6018a5d5861a7ca1b1ecdb98.tar.gz
gcc-c27722368bb7d52f6018a5d5861a7ca1b1ecdb98.tar.bz2
gfortran.texi: Document Q edit descriptor under " Extensions not implemented in GNU Fortran".
2019-03-14 Thomas Koenig <tkoenig@gcc.gnu.org> * gfortran.texi: Document Q edit descriptor under " Extensions not implemented in GNU Fortran". From-SVN: r269690
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/gfortran.texi24
2 files changed, 27 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 8264e59..c46d399 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+2019-03-14 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ * gfortran.texi: Document Q edit descriptor under
+ " Extensions not implemented in GNU Fortran".
+
2019-03-13 Harald Anlauf <anlauf@gmx.de>
PR fortran/87045
diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi
index 0a26809..76c1f2d 100644
--- a/gcc/fortran/gfortran.texi
+++ b/gcc/fortran/gfortran.texi
@@ -2889,13 +2889,13 @@ code that uses them running with the GNU Fortran compiler.
@menu
* ENCODE and DECODE statements::
* Variable FORMAT expressions::
-@c * Q edit descriptor::
@c * TYPE and ACCEPT I/O Statements::
@c * DEFAULTFILE, DISPOSE and RECORDTYPE I/O specifiers::
@c * Omitted arguments in procedure call::
* Alternate complex function syntax::
* Volatile COMMON blocks::
* OPEN( ... NAME=)::
+* Q edit descriptor::
@end menu
@node ENCODE and DECODE statements
@@ -3018,7 +3018,7 @@ invalid standard Fortran syntax and is not supported by
@node OPEN( ... NAME=)
@subsection @code{OPEN( ... NAME=)}
-@cindex @code{NAM}
+@cindex @code{NAME}
Some Fortran compilers, including @command{g77}, let the user declare
@code{OPEN( ... NAME=)}. This is
@@ -3026,6 +3026,26 @@ invalid standard Fortran syntax and is not supported by
@command{gfortran}. @code{OPEN( ... NAME=)} should be replaced
with @code{OPEN( ... FILE=)}.
+@node Q edit descriptor
+@subsection @code{Q} edit descriptor
+@cindex @code{Q} edit descriptor
+
+Some Fortran compilers provide the @code{Q} edit descriptor, which
+transfers the number of characters left within an input record into an
+integer variable.
+
+A direct replacement of the @code{Q} edit descriptor is not available
+in @command{gfortran}. How to replicate its functionality using
+standard-conforming code depends on what the intent of the original
+code is.
+
+Options to replace @code{Q} may be to read the whole line into a
+character variable and then counting the number of non-blank
+characters left using @code{LEN_TRIM}. Another method may be to use
+formatted stream, read the data up to the position where the @code{Q}
+descriptor occurred, use @code{INQUIRE} to get the file position,
+count the characters up to the next @code{NEW_LINE} and then start
+reading from the position marked previously.
@c ---------------------------------------------------------------------