diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-23 03:20:19 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-23 03:20:19 +0000 |
commit | 5bfb5e9473688ce54d47f04776124bfdc04ec385 (patch) | |
tree | b0bd2fde5b77a11728b084f15ca7d794d9b4a845 /gcc/fortran | |
parent | a3f6cec23bead2cf031bb88141577d6d1a75135a (diff) | |
download | gcc-5bfb5e9473688ce54d47f04776124bfdc04ec385.tar.gz |
* gfortran.texi: Document some more GNU extensions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100074 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/fortran/gfortran.texi | 66 |
2 files changed, 70 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 09b4ab08b38..711cb74deb1 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2005-05-22 Roger Sayle <roger@eyesopen.com> + + * gfortran.texi: Document some more GNU extensions. + 2005-05-22 Francois-Xavier Coudert <coudert@clipper.ens.fr> * error.c (gfc_warning): Fix typo in comment. diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi index 67867bc6c08..2644e40257e 100644 --- a/gcc/fortran/gfortran.texi +++ b/gcc/fortran/gfortran.texi @@ -624,6 +624,12 @@ meaning. * Old-style kind specifications:: * Old-style variable initialization:: * Extensions to namelist:: +* X format descriptor:: +* Commas in FORMAT specifications:: +* I/O item lists:: +* Hexadecimal constants:: +* Real array indices:: +* Unary operators:: @end menu @node Old-style kind specifications @@ -720,6 +726,66 @@ had been called: To aid this dialog, when input is from stdin, errors produce send their messages to stderr and execution continues, even if IOSTAT is set. +@node X format descriptor +@section X format descriptor +@cindex X format descriptor + +To support legacy codes, @command{gfortran} permits the count field +of the X edit descriptor in FORMAT statements to be omitted. When +omitted, the count is implicitly assumed to be one. + +@smallexample + PRINT 10, 2, 3 +10 FORMAT (I1, X, I1) +@end smallexample + +@node Commas in FORMAT specifications +@section Commas in FORMAT specifications +@cindex Commas in FORMAT specifications + +To support legacy codes, @command{gfortran} allows the comma separator +to be omitted immediately before and after character string edit +descriptors in FORMAT statements. + +@smallexample + PRINT 10, 2, 3 +10 FORMAT ('FOO='I1' BAR='I2) +@end smallexample + +@node I/O item lists +@section I/O item lists +@cindex I/O item lists + +To support legacy codes, @command{gfortran} allows the input item list +of the READ statement, and the output item lists of the WRITE and PRINT +statements to start with a comma. + +@node Hexadecimal constants +@section Hexadecimal constants +@cindex Hexadecimal constants + +As a GNU extension, @command{gfortran} allows hexadecimal constants to +be specified using the X prefix, in addition to the standard Z prefix. + +@node Real array indices +@section Real array indices +@cindex Real array indices + +As a GNU extension, @command{gfortran} allows arrays to be indexed using +real types, whose values are implicitly converted to integers. + +@node Unary operators +@section Unary operators +@cindex Unary operators + +As a GNU extension, @command{gfortran} allows unary plus and unary +minus operators to appear as the second operand of binary arithmetic +operators without the need for parenthesis. + +@smallexample + X = Y * -Z +@end smallexample + @include intrinsic.texi @c --------------------------------------------------------------------- @c Contributing |