intrinsic.texi (GERROR, [...]): New.

2007-03-08  Daniel Franke  <franke.daniel@gmail.com>

	* intrinsic.texi (GERROR, ISATTY, TTYNAM): New.
	(ABORT, FLUSH, FNUM, IRAND, MALLOC, SIGNAL, SRAND): Fixed typo.
	* intrinsic.c (add_subroutines): Adjusted dummy argument names 
	of GERROR and TTYNAM.

From-SVN: r122712
This commit is contained in:
Daniel Franke 2007-03-08 16:30:11 -05:00 committed by Daniel Franke
parent e9dc9c4ee6
commit f53e867d73
3 changed files with 145 additions and 9 deletions

View File

@ -1,3 +1,10 @@
2007-03-08 Daniel Franke <franke.daniel@gmail.com>
* intrinsic.texi (GERROR, ISATTY, TTYNAM): New.
(ABORT, FLUSH, FNUM, IRAND, MALLOC, SIGNAL, SRAND): Fixed typo.
* intrinsic.c (add_subroutines): Adjusted dummy argument names
of GERROR and TTYNAM.
2007-07-08 Tobias Burnus <burnus@net-b.de>
* module.c (gfc_match_use): Support renaming of operators

View File

@ -2383,7 +2383,7 @@ add_subroutines (void)
dt, BT_CHARACTER, dc, REQUIRED);
add_sym_1s ("gerror", 0, BT_UNKNOWN, 0, GFC_STD_GNU,
gfc_check_gerror, NULL, gfc_resolve_gerror, c, BT_CHARACTER,
gfc_check_gerror, NULL, gfc_resolve_gerror, res, BT_CHARACTER,
dc, REQUIRED);
add_sym_2s ("getcwd", 0, BT_UNKNOWN, 0, GFC_STD_GNU,
@ -2553,7 +2553,7 @@ add_subroutines (void)
add_sym_2s ("ttynam", 0, BT_UNKNOWN, 0, GFC_STD_GNU,
gfc_check_ttynam_sub, NULL, gfc_resolve_ttynam_sub,
ut, BT_INTEGER, di, REQUIRED, c, BT_CHARACTER, dc, REQUIRED);
ut, BT_INTEGER, di, REQUIRED, name, BT_CHARACTER, dc, REQUIRED);
add_sym_2s ("umask", 0, BT_UNKNOWN, 0, GFC_STD_GNU,
gfc_check_umask_sub, NULL, gfc_resolve_umask_sub,

View File

@ -125,6 +125,7 @@ Some intrinsics have documentation yet to be completed as indicated by 'document
* @code{FSEEK}: FSEEK, Low level file positioning subroutine
* @code{FSTAT}: FSTAT, Get file status
* @code{FTELL}: FTELL, Current stream position
* @code{GERROR}: GERROR, Get last system error message
* @code{GETARG}: GETARG, Get command line arguments
* @code{GET_COMMAND}: GET_COMMAND, Get the entire command line
* @code{GET_COMMAND_ARGUMENT}: GET_COMMAND_ARGUMENT, Get command line arguments
@ -152,6 +153,7 @@ Some intrinsics have documentation yet to be completed as indicated by 'document
* @code{INT}: INT, Convert to integer type
* @code{IOR}: IOR, Bitwise logical or
* @code{IRAND}: IRAND, Integer pseudo-random number
* @code{ISATTY}: ISATTY, Whether a unit is a terminal device
* @code{ISHFT}: ISHFT, Shift bits
* @code{ISHFTC}: ISHFTC, Shift bits circularly
* @code{ITIME}: ITIME, Current local time (hour/minutes/seconds)
@ -244,6 +246,7 @@ Some intrinsics have documentation yet to be completed as indicated by 'document
* @code{TRANSFER}: TRANSFER, Transfer bit patterns
* @code{TRANSPOSE}: TRANSPOSE, Transpose an array of rank two
* @code{TRIM}: TRIM, Function to remove trailing blank characters of a string
* @code{TTYNAM}: TTYNAM, Get the name of a terminal device.
* @code{UBOUND}: UBOUND, Upper dimension bounds of an array
* @code{UMASK}: UMASK, Set the file creation mask
* @code{UNLINK}: UNLINK, Remove a file from the file system
@ -308,7 +311,7 @@ which is suitable for debugging purposes.
GNU extension
@item @emph{Class}:
non-elemental subroutine
Non-elemental subroutine
@item @emph{Syntax}:
@code{CALL ABORT}
@ -3612,7 +3615,7 @@ argument, all units are flushed, otherwise just the unit specified.
GNU extension
@item @emph{Class}:
non-elemental subroutine
Non-elemental subroutine
@item @emph{Syntax}:
@code{CALL FLUSH(UNIT)}
@ -3644,7 +3647,7 @@ open Fortran I/O unit @code{UNIT}.
GNU extension
@item @emph{Class}:
non-elemental function
Non-elemental function
@item @emph{Syntax}:
@code{RESULT = FNUM(UNIT)}
@ -3973,6 +3976,44 @@ END PROGRAM
@node GERROR
@section @code{GERROR} --- Get last system error message
@cindex @code{GERROR} intrinsic
@table @asis
@item @emph{Description}:
Returns the system error message corresponding to the last system error.
This resembles the functionality of @code{strerror(3)} in C.
@item @emph{Standard}:
GNU extension
@item @emph{Class}:
Subroutine
@item @emph{Syntax}:
@code{CALL GERROR(RESULT)}
@item @emph{Arguments}:
@multitable @columnfractions .15 .70
@item @var{RESULT} @tab Shall of type @code{CHARACTER(*)}.
@end multitable
@item @emph{Example}:
@smallexample
PROGRAM test_gerror
CHARACTER(len=100) :: msg
CALL gerror(msg)
WRITE(*,*) msg
END PROGRAM
@end smallexample
@item @emph{See also}:
@ref{IERRNO}, @ref{PERROR}
@end table
@node GETARG
@section @code{GETARG} --- Get command line arguments
@cindex @code{GETARG} intrinsic
@ -5118,7 +5159,7 @@ it is used as a new seed with @code{SRAND}.
GNU extension
@item @emph{Class}:
non-elemental function
Non-elemental function
@item @emph{Syntax}:
@code{RESULT = IRAND(FLAG)}
@ -5146,6 +5187,48 @@ end program test_irand
@node ISATTY
@section @code{ISATTY} --- Whether a unit is a terminal device.
@cindex @code{ISATTY} intrinsic
@table @asis
@item @emph{Description}:
Determine whether a unit is connected to a terminal device.
@item @emph{Standard}:
GNU extension.
@item @emph{Class}:
Non-elemental function.
@item @emph{Syntax}:
@code{RESULT = ISATTY(UNIT)}
@item @emph{Arguments}:
@multitable @columnfractions .15 .70
@item @var{UNIT} @tab Shall be a scalar @code{INTEGER(*)}.
@end multitable
@item @emph{Return value}:
Returns @code{.TRUE.} if the @var{UNIT} is connected to a terminal
device, @code{.FALSE.} otherwise.
@item @emph{Example}:
@smallexample
PROGRAM test_isatty
INTEGER(kind=1) :: unit
DO unit = 1, 10
write(*,*) isatty(unit=unit)
END DO
END PROGRAM
@end smallexample
@item @emph{See also}:
@ref{TTYNAM}
@end table
@node ISHFT
@section @code{ISHFT} --- Shift bits
@cindex @code{ISHFT} intrinsic
@ -6041,7 +6124,7 @@ using Fortran 95 pointers, the memory allocation intrinsic is
GNU extension
@item @emph{Class}:
non-elemental function
Non-elemental function
@item @emph{Syntax}:
@code{PTR = MALLOC(SIZE)}
@ -7945,7 +8028,7 @@ is supplied, it is set to the value returned by @code{signal(2)}.
GNU extension
@item @emph{Class}:
subroutine, non-elemental function
Subroutine, non-elemental function
@item @emph{Syntax}:
@multitable @columnfractions .80
@ -8291,7 +8374,7 @@ generator is specified by the required argument @var{SEED}.
GNU extension
@item @emph{Class}:
non-elemental subroutine
Non-elemental subroutine
@item @emph{Syntax}:
@code{CALL SRAND(SEED)}
@ -8805,6 +8888,52 @@ Transformational function
@node TTYNAM
@section @code{TTYNAM} --- Get the name of a terminal device.
@cindex @code{TTYNAM} intrinsic
@table @asis
@item @emph{Description}:
Get the name of a terminal device. For more information,
see @code{ttyname(3)}.
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}:
GNU extension
@item @emph{Class}:
Subroutine, non-elemental function
@item @emph{Syntax}:
@multitable @columnfractions .80
@item @code{CALL TTYNAM(UNIT, NAME)}
@item @code{NAME = TTYNAM(UNIT)}
@end multitable
@item @emph{Arguments}:
@multitable @columnfractions .15 .70
@item @var{UNIT} @tab Shall be a scalar @code{INTEGER(*)}.
@item @var{NAME} @tab Shall be of type @code{CHARACTER(*)}.
@end multitable
@item @emph{Example}:
@smallexample
PROGRAM test_ttynam
INTEGER :: unit
DO unit = 1, 10
IF (isatty(unit=unit)) write(*,*) ttynam(unit)
END DO
END PROGRAM
@end smallexample
@item @emph{See also}:
@ref{ISATTY}
@end table
@node UBOUND
@section @code{UBOUND} --- Upper dimension bounds of an array
@cindex @code{UBOUND} intrinsic