Commit a1758c52 by Brooks Moses Committed by Brooks Moses

intrinsic.texi: Added documentation for FTELL, GETLOG, and HOSTNM intrinsics.

* intrinsic.texi: Added documentation for FTELL, GETLOG, and HOSTNM intrinsics.

From-SVN: r118538
parent d19a4469
2006-11-04 Brooks Moses <brooks.moses@codesourcery.com>
* intrinsic.texi: Added documentation for FTELL, GETLOG, and
HOSTNM intrinsics.
2006-11-06 Erik Edelmann <eedelman@gcc.gnu.org> 2006-11-06 Erik Edelmann <eedelman@gcc.gnu.org>
PR fortran/29630 PR fortran/29630
......
...@@ -3878,20 +3878,45 @@ Subroutine ...@@ -3878,20 +3878,45 @@ Subroutine
@node FTELL @node FTELL
@section @code{FTELL} --- Current stream position @section @code{FTELL} --- Current stream position
@findex @code{FTELL} intrinsic @findex @code{FTELL} intrinsic
@cindex undocumented intrinsic
Intrinsic implemented, documentation pending.
@table @asis @table @asis
@item @emph{Description}: @item @emph{Description}:
Retrieves the current position within an open file.
This intrinsic is provided in both subroutine and function forms; however,
only one form can be used in any given program unit.
@item @emph{Standard}: @item @emph{Standard}:
GNU extension GNU extension
@item @emph{Class}: @item @emph{Class}:
Subroutine, function
@item @emph{Syntax}: @item @emph{Syntax}:
@multitable @columnfractions .80
@item @code{CALL FTELL(UNIT, OFFSET)}
@item @code{OFFSET = FTELL(UNIT)}
@end multitable
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80
@item @var{OFFSET} @tab Shall of type @code{INTEGER}.
@item @var{UNIT} @tab Shall of type @code{INTEGER}.
@end multitable
@item @emph{Return value}: @item @emph{Return value}:
In either syntax, @var{OFFSET} is set to the current offset of unit
number @var{UNIT}, or to @math{-1} if the unit is not currently open.
@item @emph{Example}: @item @emph{Example}:
@smallexample
PROGRAM test_ftell
INTEGER :: i
OPEN(10, FILE="temp.dat")
CALL ftell(10,i)
WRITE(*,*) i
END PROGRAM
@end smallexample
@item @emph{See also}: @item @emph{See also}:
@ref{FSEEK} @ref{FSEEK}
...@@ -4216,7 +4241,7 @@ kind. ...@@ -4216,7 +4241,7 @@ kind.
See @code{GETPID} for an example. See @code{GETPID} for an example.
@item @emph{See also}: @item @emph{See also}:
@ref{GETPID} @ref{GETPID}, @ref{GETUID}
@end table @end table
...@@ -4224,12 +4249,11 @@ See @code{GETPID} for an example. ...@@ -4224,12 +4249,11 @@ See @code{GETPID} for an example.
@node GETLOG @node GETLOG
@section @code{GETLOG} --- Get login name @section @code{GETLOG} --- Get login name
@findex @code{GETLOG} intrinsic @findex @code{GETLOG} intrinsic
@cindex undocumented intrinsic
Intrinsic implemented, documentation pending.
@table @asis @table @asis
@item @emph{Description}: @item @emph{Description}:
Gets the username under which the program is running.
@item @emph{Standard}: @item @emph{Standard}:
GNU extension GNU extension
...@@ -4237,16 +4261,33 @@ GNU extension ...@@ -4237,16 +4261,33 @@ GNU extension
Subroutine Subroutine
@item @emph{Syntax}: @item @emph{Syntax}:
@code{CALL GETLOG(LOGIN)}
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80
@item @var{LOGIN} @tab Shall be of type @code{CHARACTER(*)}.
@end multitable
@item @emph{Return value}: @item @emph{Return value}:
Stores the current user name in @var{LOGIN}. (On systems where
the @code{getlogin(3)} function is not implemented, this will
return a blank string.)
@item @emph{Example}: @item @emph{Example}:
@item @emph{Specific names}: @smallexample
PROGRAM TEST_GETLOG
CHARACTER(32) :: login
CALL GETLOG(login)
WRITE(*,*) login
END PROGRAM
@end smallexample
@item @emph{See also}: @item @emph{See also}:
@ref{GETUID}
@end table @end table
@node GETPID @node GETPID
@section @code{GETPID} --- Process ID function @section @code{GETPID} --- Process ID function
@findex @code{GETPID} intrinsic @findex @code{GETPID} intrinsic
...@@ -4279,6 +4320,8 @@ program info ...@@ -4279,6 +4320,8 @@ program info
end program info end program info
@end smallexample @end smallexample
@item @emph{See also}:
@ref{GETGID}, @ref{GETUID}
@end table @end table
...@@ -4310,7 +4353,7 @@ kind. ...@@ -4310,7 +4353,7 @@ kind.
See @code{GETPID} for an example. See @code{GETPID} for an example.
@item @emph{See also}: @item @emph{See also}:
@ref{GETPID} @ref{GETPID}, @ref{GETLOG}
@end table @end table
...@@ -4345,22 +4388,38 @@ Subroutine ...@@ -4345,22 +4388,38 @@ Subroutine
@node HOSTNM @node HOSTNM
@section @code{HOSTNM} --- Get system host name @section @code{HOSTNM} --- Get system host name
@findex @code{HOSTNM} intrinsic @findex @code{HOSTNM} intrinsic
@cindex undocumented intrinsic
Intrinsic implemented, documentation pending.
@table @asis @table @asis
@item @emph{Description}: @item @emph{Description}:
Retrieves the host name of the system on which the program is running.
This intrinsic is provided in both subroutine and function forms; however,
only one form can be used in any given program unit.
@item @emph{Standard}: @item @emph{Standard}:
GNU extension GNU extension
@item @emph{Class}: @item @emph{Class}:
Subroutine, function
@item @emph{Syntax}: @item @emph{Syntax}:
@multitable @columnfractions .80
@item @code{CALL HOSTNM(NAME, STATUS)}
@item @code{STATUS = HOSTNM(NAME)}
@end multitable
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80
@item @var{NAME} @tab Shall of type @code{CHARACTER(*)}.
@item @var{STATUS} @tab (Optional) status flag of type @code{INTEGER}.
Returns 0 on success, or a system specific error
code otherwise.
@end multitable
@item @emph{Return value}: @item @emph{Return value}:
@item @emph{Example}: In either syntax, @var{NAME} is set to the current hostname if it can
@item @emph{Specific names}: be obtained, or to a blank string otherwise.
@item @emph{See also}:
@end table @end table
......
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