Commit 26d29061 by Tobias Burnus Committed by Brooks Moses

gfortran.texi: Add link to GFortran apps

2006-10-14  Tobias Burnus  <burnus@net-b.de>
	* gfortran.texi: Add link to GFortran apps
	* intrinsic.texi: Updated documentation of ACCESS and CHMOD

From-SVN: r117740
parent 7a1109bf
2006-10-14 Tobias Burnus <burnus@net-b.de>
* gfortran.texi: Add link to GFortran apps
* intrinsic.texi: Updated documentation of ACCESS and CHMOD
2006-10-14 Jerry DeLisle <jvdelisle@gcc.gnu.org> 2006-10-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/19261 PR fortran/19261
......
...@@ -161,7 +161,7 @@ it will do everything you expect from any decent compiler: ...@@ -161,7 +161,7 @@ it will do everything you expect from any decent compiler:
@item @item
Read a user's program, Read a user's program,
stored in a file and containing instructions written stored in a file and containing instructions written
in Fortran 77, Fortran 90 or Fortran 95. in Fortran 77, Fortran 90, Fortran 95 or Fortran 2003.
This file contains @dfn{source code}. This file contains @dfn{source code}.
@item @item
...@@ -404,7 +404,8 @@ large real-world programs, including ...@@ -404,7 +404,8 @@ large real-world programs, including
@uref{http://mysite.verizon.net/serveall/moene.pdf, the HIRLAM @uref{http://mysite.verizon.net/serveall/moene.pdf, the HIRLAM
weather-forecasting code} and weather-forecasting code} and
@uref{http://www.theochem.uwa.edu.au/tonto/, the Tonto quantum @uref{http://www.theochem.uwa.edu.au/tonto/, the Tonto quantum
chemistry package}. chemistry package}; see @url{http://gcc.gnu.org/wiki/GfortranApps} for an
extended list.
Among other things, the GNU Fortran compiler is intended as a replacement Among other things, the GNU Fortran compiler is intended as a replacement
for G77. At this point, nearly all programs that could be compiled with for G77. At this point, nearly all programs that could be compiled with
......
...@@ -52,7 +52,7 @@ Some intrinsics have documentation yet to be completed as indicated by 'document ...@@ -52,7 +52,7 @@ Some intrinsics have documentation yet to be completed as indicated by 'document
* Introduction: Introduction * Introduction: Introduction
* @code{ABORT}: ABORT, Abort the program * @code{ABORT}: ABORT, Abort the program
* @code{ABS}: ABS, Absolute value * @code{ABS}: ABS, Absolute value
* @code{ACCESS}: ACCESS, Checks file access method * @code{ACCESS}: ACCESS, Checks file access modes
* @code{ACHAR}: ACHAR, Character in @acronym{ASCII} collating sequence * @code{ACHAR}: ACHAR, Character in @acronym{ASCII} collating sequence
* @code{ACOS}: ACOS, Arccosine function * @code{ACOS}: ACOS, Arccosine function
* @code{ACOSH}: ACOSH, Hyperbolic arccosine function * @code{ACOSH}: ACOSH, Hyperbolic arccosine function
...@@ -389,23 +389,56 @@ end program test_abs ...@@ -389,23 +389,56 @@ end program test_abs
@node ACCESS @node ACCESS
@section @code{ACCESS} --- Checks file access method @section @code{ACCESS} --- Checks file access modes
@findex @code{ACCESS} @findex @code{ACCESS}
@cindex file system functions @cindex file system functions
Not yet implemented in GNU Fortran.
@table @asis @table @asis
@item @emph{Description}: @item @emph{Description}:
@code{ACCESS(NAME, MODE)} checks whether the file @var{NAME}
exists, is readable, writable or executable. Except for the
executable check, @code{ACCESS} can be replaced by
Fortran 95's @code{INQUIRE}.
@item @emph{Standard}: @item @emph{Standard}:
GNU extension GNU extension
@item @emph{Class}: @item @emph{Class}:
Inquiry function
@item @emph{Syntax}: @item @emph{Syntax}:
@code{I = ACCESS(NAME, MODE)}
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80
@item @var{NAME} @tab Scalar @code{CHARACTER} with the file name.
Tailing blank are ignored unless the character @code{achar(0)} is
present, then all characters up to and excluding @code{achar(0)} are
used as file name.
@item @var{MODE} @tab Scalar @code{CHARACTER} with the file access mode,
may be any concatenation of @code{"r"} (readable), @code{"w"} (writable)
and @code{"x"} (executable), or @code{" "} to check for existance.
@end multitable
@item @emph{Return value}: @item @emph{Return value}:
Returns a scalar @code{INTEGER}, which is @code{0} if the file is
accessable in the given mode; otherwise or if an invalid argument
has been given for @code{MODE} the value @code{1} is returned.
@item @emph{Example}: @item @emph{Example}:
@smallexample
program access_test
implicit none
character(len=*), parameter :: file = 'test.dat'
character(len=*), parameter :: file2 = 'test.dat '//achar(0)
if(access(file,' ') == 0) print *, trim(file),' is exists'
if(access(file,'r') == 0) print *, trim(file),' is readable'
if(access(file,'w') == 0) print *, trim(file),' is writable'
if(access(file,'x') == 0) print *, trim(file),' is executable'
if(access(file2,'rwx') == 0) &
print *, trim(file2),' is readable, writable and executable'
end program access_test
@end smallexample
@item @emph{Specific names}: @item @emph{Specific names}:
@item @emph{See also}: @item @emph{See also}:
...@@ -1873,10 +1906,11 @@ END PROGRAM ...@@ -1873,10 +1906,11 @@ END PROGRAM
@findex @code{CHMOD} @findex @code{CHMOD}
@cindex file system functions @cindex file system functions
Not yet implemented in GNU Fortran.
@table @asis @table @asis
@item @emph{Description}: @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}: @item @emph{Standard}:
GNU extension GNU extension
...@@ -1885,9 +1919,32 @@ GNU extension ...@@ -1885,9 +1919,32 @@ GNU extension
Subroutine Subroutine
@item @emph{Syntax}: @item @emph{Syntax}:
@code{CHMOD(NAME, MODE[, STATUS])}
@item @emph{Arguments}: @item @emph{Arguments}:
@item @emph{Return value}: @multitable @columnfractions .15 .80
@item @var{NAME} @tab Scalar @code{CHARACTER} with the file name.
Trailing blanks are ignored unless the character @code{achar(0)} is
present, then all characters up to and excluding @code{achar(0)} are
used as the file name.
@item @var{MODE} @tab Scalar @code{CHARACTER} giving the file permission.
@var{MODE} uses the same syntax as the @var{MODE} argument of
@code{/bin/chmod}.
@item @var{STATUS} @tab (optional) scalar @code{INTEGER}, which is
@code{0} on success and non-zero otherwise.
@end multitable
@item @emph{Example}: @item @emph{Example}:
@smallexample
program chmod_test
implicit none
integer :: status
call chmod('test.dat','u+x',status)
print *, 'Status: ', status
end program chmod_test
@end smallexample
@item @emph{Specific names}: @item @emph{Specific names}:
@item @emph{See also}: @item @emph{See also}:
......
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