This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[patch,fortran] texi patch: fix CHMOD entry, list volatile and internal-file namelist support
- From: Tobias Burnus <burnus at net-b dot de>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>, "'fortran at gcc dot gnu dot org'" <fortran at gcc dot gnu dot org>
- Date: Tue, 07 Nov 2006 15:05:04 +0100
- Subject: [patch,fortran] texi patch: fix CHMOD entry, list volatile and internal-file namelist support
:ADDPATCH fortran:
The first small patch adds VOLATILE and the internal-file namelist
support to the supported Fortran 2003 features.
The second corrects the CHMOD entry. I claimed that CHMOD as function
does not work. It does, but subroutine and function don't work in the
same program.
Question to the latter: How to handle intrinsics which are function and
subroutine in one?
One entry? Two entries? How distinguish argument and return value?
My patch puts them in one entry, is this ok?
Tested by "make info" and "make pdf".
Tobias
2006-11-07 Tobias Burnus <burnus@net-b.de>
* gfortran.texi: Add volatile and internal-file namelist to Fortran
2003 status.
* intrinsic.texi: Correct CHMOD entry.
Index: gcc/fortran/gfortran.texi
===================================================================
--- gcc/fortran/gfortran.texi (Revision 118545)
+++ gcc/fortran/gfortran.texi (Arbeitskopie)
@@ -1380,8 +1380,14 @@
The @code{OPEN} statement supports the @code{ACCESS='STREAM'} specifier,
allowing I/O without any record structure.
+@item
+Namelist input/output for internal files.
+@item
+@cindex @code{VOLATILE}
+The @code{VOLATILE} statement and attribute.
+
@end itemize
Index: gcc/fortran/intrinsic.texi
===================================================================
--- gcc/fortran/intrinsic.texi (Revision 118545)
+++ gcc/fortran/intrinsic.texi (Arbeitskopie)
@@ -1910,16 +1910,18 @@
@item @emph{Description}:
@code{CHMOD} changes the permissions of a file. This function invokes
@code{/bin/chmod} and might therefore not work on all platforms.
-@code{CHMOD} as an intrinsic function is not implemented in GNU Fortran.
@item @emph{Standard}:
GNU extension
@item @emph{Class}:
-Subroutine
+Subroutine, non-elemental function
@item @emph{Syntax}:
-@code{CHMOD(NAME, MODE[, STATUS])}
+@multitable @columnfractions .80
+@item @code{CALL CHMOD(NAME, MODE[, STATUS])}
+@item @code{STATUS = CHMOD(NAME, MODE)}
+@end multitable
@item @emph{Arguments}:
@multitable @columnfractions .15 .80
@@ -1937,6 +1939,7 @@
@end multitable
@item @emph{Example}:
+@code{CHMOD} as subroutine
@smallexample
program chmod_test
implicit none
@@ -1945,6 +1948,15 @@
print *, 'Status: ', status
end program chmod_test
@end smallexample
+@code{CHMOD} as non-elemental function:
+@smallexample
+program chmod_test
+ implicit none
+ integer :: status
+ status = chmod('test.dat','u+x')
+ print *, 'Status: ', status
+end program chmod_test
+@end smallexample
@item @emph{Specific names}:
@item @emph{See also}: