Go to the first, previous, next, last section, table of contents.
The GNU Fortran compiler, g77
, supports programs written
in the GNU Fortran language and in some other dialects of Fortran.
Some aspects of how g77
works are universal regardless
of dialect, and yet are not properly part of the GNU Fortran
language itself.
These are described below.
Note: This portion of the documentation definitely needs a lot of work!
g77
, as with GNU tools in general, imposes few arbitrary restrictions
on lengths of identifiers, number of continuation lines, number of external
symbols in a program, and so on.
For example, some other Fortran compiler have an option (such as `-Nlx') to increase the limit on the number of continuation lines. Also, some Fortran compilation systems have an option (such as `-Nxx') to increase the limit on the number of external symbols.
g77
, gcc
, and GNU ld
(the GNU linker) have
no equivalent options, since they do not impose arbitrary
limits in these areas.
g77
does currently limit the number of dimensions in an array
to the same degree as do the Fortran standards--seven (7).
This restriction might well be lifted in a future version.
Fortran implementations have a fair amount of freedom given them by the
standard as far as how much storage space is used and how much precision
and range is offered by the various types such as LOGICAL(KIND=1)
,
INTEGER(KIND=1)
, REAL(KIND=1)
, REAL(KIND=2)
,
COMPLEX(KIND=1)
, and CHARACTER
.
Further, many compilers offer so-called `*n' notation, but
the interpretation of n varies across compilers and target architectures.
The standard requires that LOGICAL(KIND=1)
, INTEGER(KIND=1)
,
and REAL(KIND=1)
occupy the same amount of storage space, and that COMPLEX(KIND=1)
and REAL(KIND=2)
take twice as much storage space as REAL(KIND=1)
.
Further, it requires that COMPLEX(KIND=1)
entities be ordered such that when a COMPLEX(KIND=1)
variable is
storage-associated (such as via EQUIVALENCE
)
with a two-element REAL(KIND=1)
array named `R', `R(1)'
corresponds to the real element and `R(2)' to the imaginary
element of the COMPLEX(KIND=1)
variable.
(Few requirements as to precision or ranges of any of these are
placed on the implementation, nor is the relationship of storage sizes of
these types to the CHARACTER
type specified, by the standard.)
g77
follows the above requirements, warning when compiling
a program requires placement of items in memory that contradict the
requirements of the target architecture.
(For example, a program can require placement of a REAL(KIND=2)
on a boundary that is not an even multiple of its size, but still an
even multiple of the size of a REAL(KIND=1)
variable.
On some target architectures, using the canonical
mapping of Fortran types to underlying architectural types, such
placement is prohibited by the machine definition or
the Application Binary Interface (ABI) in force for
the configuration defined for building gcc
and g77
.
g77
warns about such
situations when it encounters them.)
g77
follows consistent rules for configuring the mapping between Fortran
types, including the `*n' notation, and the underlying architectural
types as accessed by a similarly-configured applicable version of the
gcc
compiler.
These rules offer a widely portable, consistent Fortran/C
environment, although they might well conflict with the expectations of
users of Fortran compilers designed and written for particular
architectures.
These rules are based on the configuration that is in force for the
version of gcc
built in the same release as g77
(and
which was therefore used to build both the g77
compiler
components and the libg2c
run-time library):
REAL(KIND=1)
float
type.
REAL(KIND=2)
float
---usually, this is a double
.
INTEGER(KIND=1)
float
---usually, this is either
an int
or a long int
.
LOGICAL(KIND=1)
gcc
type as INTEGER(KIND=1)
.
INTEGER(KIND=2)
INTEGER(KIND=1)
---usually, this is either
a long int
or a long long int
.
LOGICAL(KIND=2)
gcc
type as INTEGER(KIND=2)
.
INTEGER(KIND=3)
gcc
type as signed char
.
LOGICAL(KIND=3)
gcc
type as INTEGER(KIND=3)
.
INTEGER(KIND=6)
INTEGER(KIND=3)
---usually, this is
a short
.
LOGICAL(KIND=6)
gcc
type as INTEGER(KIND=6)
.
COMPLEX(KIND=1)
REAL(KIND=1)
scalars (one for the real part followed by
one for the imaginary part).
COMPLEX(KIND=2)
REAL(KIND=2)
scalars.
numeric-type*n
CHARACTER
.)
Same as whatever gcc
type occupies n times the storage
space of a gcc
char
item.
DOUBLE PRECISION
REAL(KIND=2)
.
DOUBLE COMPLEX
COMPLEX(KIND=2)
.
Note that the above are proposed correspondences and might change
in future versions of g77
---avoid writing code depending
on them.
Other types supported by g77
are derived from gcc types such as char
, short
,
int
, long int
, long long int
, long double
,
and so on.
That is, whatever types gcc
already supports, g77
supports
now or probably will support in a future version.
The rules for the `numeric-type*n' notation
apply to these types,
and new values for `numeric-type(KIND=n)' will be
assigned in a way that encourages clarity, consistency, and portability.
g77
strictly assigns types to all constants not
documented as "typeless" (typeless constants including `'1'Z',
for example).
Many other Fortran compilers attempt to assign types to typed constants
based on their context.
This results in hard-to-find bugs, nonportable
code, and is not in the spirit (though it strictly follows the letter)
of the 77 and 90 standards.
g77
might offer, in a future release, explicit constructs by
which a wider variety of typeless constants may be specified, and/or
user-requested warnings indicating places where g77
might differ
from how other compilers assign types to constants.
See section Context-Sensitive Constants, for more information on this issue.
g77
offers an ever-widening set of intrinsics.
Currently these all are procedures (functions and subroutines).
Some of these intrinsics are unimplemented, but their names reserved to reduce future problems with existing code as they are implemented. Others are implemented as part of the GNU Fortran language, while yet others are provided for compatibility with other dialects of Fortran but are not part of the GNU Fortran language.
To manage these distinctions, g77
provides intrinsic groups,
a facility that is simply an extension of the intrinsic groups provided
by the GNU Fortran language.
A given specific intrinsic belongs in one or more groups. Each group is deleted, disabled, hidden, or enabled by default or a command-line option. The meaning of each term follows.
INTRINSIC
statement)
are disallowed through that group.
INTRINSIC
statement.
The distinction between deleting and disabling a group is illustrated by the following example. Assume intrinsic `FOO' belongs only to group `FGR'. If group `FGR' is deleted, the following program unit will successfully compile, because `FOO()' will be seen as a reference to an external function named `FOO':
PRINT *, FOO() END
If group `FGR' is disabled, compiling the above program will produce diagnostics, either because the `FOO' intrinsic is improperly invoked or, if properly invoked, it is not enabled. To change the above program so it references an external function `FOO' instead of the disabled `FOO' intrinsic, add the following line to the top:
EXTERNAL FOO
So, deleting a group tells g77
to pretend as though the intrinsics in
that group do not exist at all, whereas disabling it tells g77
to
recognize them as (disabled) intrinsics in intrinsic-like contexts.
Hiding a group is like enabling it, but the intrinsic must be first
named in an INTRINSIC
statement to be considered a reference to the
intrinsic rather than to an external procedure.
This might be the "safest" way to treat a new group of intrinsics
when compiling old
code, because it allows the old code to be generally written as if
those new intrinsics never existed, but to be changed to use them
by inserting INTRINSIC
statements in the appropriate places.
However, it should be the goal of development to use EXTERNAL
for all names of external procedures that might be intrinsic names.
If an intrinsic is in more than one group, it is enabled if any of its
containing groups are enabled; if not so enabled, it is hidden if
any of its containing groups are hidden; if not so hidden, it is disabled
if any of its containing groups are disabled; if not so disabled, it is
deleted.
This extra complication is necessary because some intrinsics,
such as IBITS
, belong to more than one group, and hence should be
enabled if any of the groups to which they belong are enabled, and so
on.
The groups are:
badu77
gnu
f2c
f2c
converter and/or libf2c
.
f90
mil
MVBITS
, IAND
, BTEST
, and so on).
unix
IARGC
, EXIT
, ERF
, and so on).
vxt
g77
supports intrinsics other than those in the GNU Fortran
language proper.
This set of intrinsics is described below.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL ACosD' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL AIMax0' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL AIMin0' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL AJMax0' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL AJMin0' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL ASinD' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL ATan2D' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL ATanD' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL BITest' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL BJTest' to use this name for an external procedure.
CDAbs(A)
CDAbs: REAL(KIND=2)
function.
A: COMPLEX(KIND=2)
; scalar; INTENT(IN).
Intrinsic groups: f2c
, vxt
.
Description:
Archaic form of ABS()
that is specific
to one type for A.
See section Abs Intrinsic.
CDCos(X)
CDCos: COMPLEX(KIND=2)
function.
X: COMPLEX(KIND=2)
; scalar; INTENT(IN).
Intrinsic groups: f2c
, vxt
.
Description:
Archaic form of COS()
that is specific
to one type for X.
See section Cos Intrinsic.
CDExp(X)
CDExp: COMPLEX(KIND=2)
function.
X: COMPLEX(KIND=2)
; scalar; INTENT(IN).
Intrinsic groups: f2c
, vxt
.
Description:
Archaic form of EXP()
that is specific
to one type for X.
See section Exp Intrinsic.
CDLog(X)
CDLog: COMPLEX(KIND=2)
function.
X: COMPLEX(KIND=2)
; scalar; INTENT(IN).
Intrinsic groups: f2c
, vxt
.
Description:
Archaic form of LOG()
that is specific
to one type for X.
See section Log Intrinsic.
CDSin(X)
CDSin: COMPLEX(KIND=2)
function.
X: COMPLEX(KIND=2)
; scalar; INTENT(IN).
Intrinsic groups: f2c
, vxt
.
Description:
Archaic form of SIN()
that is specific
to one type for X.
See section Sin Intrinsic.
CDSqRt(X)
CDSqRt: COMPLEX(KIND=2)
function.
X: COMPLEX(KIND=2)
; scalar; INTENT(IN).
Intrinsic groups: f2c
, vxt
.
Description:
Archaic form of SQRT()
that is specific
to one type for X.
See section SqRt Intrinsic.
ChDir(Dir)
ChDir: INTEGER(KIND=1)
function.
Dir: CHARACTER
; scalar; INTENT(IN).
Intrinsic groups: badu77
.
Description:
Sets the current working directory to be Dir.
Returns 0 on success or a non-zero error code.
See chdir(3)
.
Caution: Using this routine during I/O to a unit connected with a non-absolute file name can cause subsequent I/O on such a unit to fail because the I/O library may reopen files by name.
Due to the side effects performed by this intrinsic, the function form is not recommended.
For information on other intrinsics with the same name: See section ChDir Intrinsic (subroutine).
ChMod(Name, Mode)
ChMod: INTEGER(KIND=1)
function.
Name: CHARACTER
; scalar; INTENT(IN).
Mode: CHARACTER
; scalar; INTENT(IN).
Intrinsic groups: badu77
.
Description:
Changes the access mode of file Name according to the
specification Mode, which is given in the format of
chmod(1)
.
A null character (`CHAR(0)') marks the end of
the name in Name---otherwise,
trailing blanks in Name are ignored.
Currently, Name must not contain the single quote
character.
Returns 0 on success or a non-zero error code otherwise.
Note that this currently works
by actually invoking /bin/chmod
(or the chmod
found when
the library was configured) and so may fail in some circumstances and
will, anyway, be slow.
Due to the side effects performed by this intrinsic, the function form is not recommended.
For information on other intrinsics with the same name: See section ChMod Intrinsic (subroutine).
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL CosD' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL DACosD' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL DASinD' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL DATan2D' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL DATanD' to use this name for an external procedure.
CALL Date(Date)
Date: CHARACTER
; scalar; INTENT(OUT).
Intrinsic groups: vxt
.
Description:
Returns Date in the form `dd-mmm-yy', representing the numeric day of the month dd, a three-character abbreviation of the month name mmm and the last two digits of the year yy, e.g. `25-Nov-96'.
This intrinsic is not recommended, due to the year 2000 approaching. See section CTime Intrinsic (subroutine), for information on obtaining more digits for the current (or any) date.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL DbleQ' to use this name for an external procedure.
DCmplx(X, Y)
DCmplx: COMPLEX(KIND=2)
function.
X: INTEGER
, REAL
, or COMPLEX
; scalar; INTENT(IN).
Y: INTEGER
or REAL
; OPTIONAL (must be omitted if X is COMPLEX
); scalar; INTENT(IN).
Intrinsic groups: f2c
, vxt
.
Description:
If X is not type COMPLEX
,
constructs a value of type COMPLEX(KIND=2)
from the
real and imaginary values specified by X and
Y, respectively.
If Y is omitted, `0D0' is assumed.
If X is type COMPLEX
,
converts it to type COMPLEX(KIND=2)
.
Although this intrinsic is not standard Fortran,
it is a popular extension offered by many compilers
that support DOUBLE COMPLEX
, since it offers
the easiest way to convert to DOUBLE COMPLEX
without using Fortran 90 features (such as the `KIND='
argument to the CMPLX()
intrinsic).
(`CMPLX(0D0, 0D0)' returns a single-precision
COMPLEX
result, as required by standard FORTRAN 77.
That's why so many compilers provide DCMPLX()
, since
`DCMPLX(0D0, 0D0)' returns a DOUBLE COMPLEX
result.
Still, DCMPLX()
converts even REAL*16
arguments
to their REAL*8
equivalents in most dialects of
Fortran, so neither it nor CMPLX()
allow easy
construction of arbitrary-precision values without
potentially forcing a conversion involving extending or
reducing precision.
GNU Fortran provides such an intrinsic, called COMPLEX()
.)
See section Complex Intrinsic, for information on easily constructing
a COMPLEX
value of arbitrary precision from REAL
arguments.
DConjg(Z)
DConjg: COMPLEX(KIND=2)
function.
Z: COMPLEX(KIND=2)
; scalar; INTENT(IN).
Intrinsic groups: f2c
, vxt
.
Description:
Archaic form of CONJG()
that is specific
to one type for Z.
See section Conjg Intrinsic.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL DCosD' to use this name for an external procedure.
DFloat(A)
DFloat: REAL(KIND=2)
function.
A: INTEGER
; scalar; INTENT(IN).
Intrinsic groups: f2c
, vxt
.
Description:
Archaic form of REAL()
that is specific
to one type for A.
See section Real Intrinsic.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL DFlotI' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL DFlotJ' to use this name for an external procedure.
DImag(Z)
DImag: REAL(KIND=2)
function.
Z: COMPLEX(KIND=2)
; scalar; INTENT(IN).
Intrinsic groups: f2c
, vxt
.
Description:
Archaic form of AIMAG()
that is specific
to one type for Z.
See section AImag Intrinsic.
DReal(A)
DReal: REAL(KIND=2)
function.
A: INTEGER
, REAL
, or COMPLEX
; scalar; INTENT(IN).
Intrinsic groups: vxt
.
Description:
Converts A to REAL(KIND=2)
.
If A is type COMPLEX
, its real part
is converted (if necessary) to REAL(KIND=2)
,
and its imaginary part is disregarded.
Although this intrinsic is not standard Fortran,
it is a popular extension offered by many compilers
that support DOUBLE COMPLEX
, since it offers
the easiest way to extract the real part of a DOUBLE COMPLEX
value without using the Fortran 90 REAL()
intrinsic
in a way that produces a return value inconsistent with
the way many FORTRAN 77 compilers handle REAL()
of
a DOUBLE COMPLEX
value.
See section RealPart Intrinsic, for information on a GNU Fortran intrinsic that avoids these areas of confusion.
See section Dble Intrinsic, for information on the standard FORTRAN 77
replacement for DREAL()
.
See section REAL()
and AIMAG()
of Complex, for more information on
this issue.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL DSinD' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL DTanD' to use this name for an external procedure.
Dtime(TArray)
Dtime: REAL(KIND=1)
function.
TArray: REAL(KIND=1)
; DIMENSION(2); INTENT(OUT).
Intrinsic groups: badu77
.
Description:
Initially, return the number of seconds of runtime since the start of the process's execution as the function value, and the user and system components of this in `TArray(1)' and `TArray(2)' respectively. The functions' value is equal to `TArray(1) + TArray(2)'.
Subsequent invocations of `DTIME()' return values accumulated since the previous invocation.
Due to the side effects performed by this intrinsic, the function form is not recommended.
For information on other intrinsics with the same name: See section Dtime Intrinsic (subroutine).
FGet(C)
FGet: INTEGER(KIND=1)
function.
C: CHARACTER
; scalar; INTENT(OUT).
Intrinsic groups: badu77
.
Description:
Reads a single character into C in stream mode from unit 5
(by-passing normal formatted input) using getc(3)
.
Returns 0 on
success, -1 on end-of-file, and the error code from
ferror(3)
otherwise.
Stream I/O should not be mixed with normal record-oriented (formatted or unformatted) I/O on the same unit; the results are unpredictable.
For information on other intrinsics with the same name: See section FGet Intrinsic (subroutine).
FGetC(Unit, C)
FGetC: INTEGER(KIND=1)
function.
Unit: INTEGER
; scalar; INTENT(IN).
C: CHARACTER
; scalar; INTENT(OUT).
Intrinsic groups: badu77
.
Description:
Reads a single character into C in stream mode from unit Unit
(by-passing normal formatted output) using getc(3)
.
Returns 0 on
success, -1 on end-of-file, and the error code from
ferror(3)
otherwise.
Stream I/O should not be mixed with normal record-oriented (formatted or unformatted) I/O on the same unit; the results are unpredictable.
For information on other intrinsics with the same name: See section FGetC Intrinsic (subroutine).
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL FloatI' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL FloatJ' to use this name for an external procedure.
FPut(C)
FPut: INTEGER(KIND=1)
function.
C: CHARACTER
; scalar; INTENT(IN).
Intrinsic groups: badu77
.
Description:
Writes the single character C in stream mode to unit 6
(by-passing normal formatted output) using getc(3)
.
Returns 0 on
success, the error code from ferror(3)
otherwise.
Stream I/O should not be mixed with normal record-oriented (formatted or unformatted) I/O on the same unit; the results are unpredictable.
For information on other intrinsics with the same name: See section FPut Intrinsic (subroutine).
FPutC(Unit, C)
FPutC: INTEGER(KIND=1)
function.
Unit: INTEGER
; scalar; INTENT(IN).
C: CHARACTER
; scalar; INTENT(IN).
Intrinsic groups: badu77
.
Description:
Writes the single character C in stream mode to unit Unit
(by-passing normal formatted output) using putc(3)
.
Returns 0 on
success, the error code from ferror(3)
otherwise.
Stream I/O should not be mixed with normal record-oriented (formatted or unformatted) I/O on the same unit; the results are unpredictable.
For information on other intrinsics with the same name: See section FPutC Intrinsic (subroutine).
CALL IDate(M, D, Y)
M: INTEGER(KIND=1)
; scalar; INTENT(OUT).
D: INTEGER(KIND=1)
; scalar; INTENT(OUT).
Y: INTEGER(KIND=1)
; scalar; INTENT(OUT).
Intrinsic groups: vxt
.
Description:
Returns the numerical values of the current local time. The month (in the range 1--12) is returned in M, the day (in the range 1--7) in D, and the year in Y (in the range 0--99).
This intrinsic is not recommended, due to the year 2000 approaching.
For information on other intrinsics with the same name: See section IDate Intrinsic (UNIX).
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL IIAbs' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL IIAnd' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL IIBClr' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL IIBits' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL IIBSet' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL IIDiM' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL IIDInt' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL IIDNnt' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL IIEOr' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL IIFix' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL IInt' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL IIOr' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL IIQint' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL IIQNnt' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL IIShftC' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL IISign' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL IMax0' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL IMax1' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL IMin0' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL IMin1' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL IMod' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL INInt' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL INot' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL IZExt' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JIAbs' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JIAnd' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JIBClr' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JIBits' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JIBSet' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JIDiM' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JIDInt' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JIDNnt' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JIEOr' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JIFix' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JInt' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JIOr' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JIQint' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JIQNnt' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JIShft' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JIShftC' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JISign' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JMax0' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JMax1' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JMin0' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JMin1' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JMod' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JNInt' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JNot' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL JZExt' to use this name for an external procedure.
Kill(Pid, Signal)
Kill: INTEGER(KIND=1)
function.
Pid: INTEGER
; scalar; INTENT(IN).
Signal: INTEGER
; scalar; INTENT(IN).
Intrinsic groups: badu77
.
Description:
Sends the signal specified by Signal to the process Pid.
Returns 0 on success or a non-zero error code.
See kill(2)
.
Due to the side effects performed by this intrinsic, the function form is not recommended.
For information on other intrinsics with the same name: See section Kill Intrinsic (subroutine).
Link(Path1, Path2)
Link: INTEGER(KIND=1)
function.
Path1: CHARACTER
; scalar; INTENT(IN).
Path2: CHARACTER
; scalar; INTENT(IN).
Intrinsic groups: badu77
.
Description:
Makes a (hard) link from file Path1 to Path2.
A null character (`CHAR(0)') marks the end of
the names in Path1 and Path2---otherwise,
trailing blanks in Path1 and Path2 are ignored.
Returns 0 on success or a non-zero error code.
See link(2)
.
Due to the side effects performed by this intrinsic, the function form is not recommended.
For information on other intrinsics with the same name: See section Link Intrinsic (subroutine).
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QAbs' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QACos' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QACosD' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QASin' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QASinD' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QATan' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QATan2' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QATan2D' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QATanD' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QCos' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QCosD' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QCosH' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QDiM' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QExp' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QExt' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QExtD' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QFloat' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QInt' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QLog' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QLog10' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QMax1' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QMin1' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QMod' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QNInt' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QSin' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QSinD' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QSinH' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QSqRt' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QTan' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QTanD' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL QTanH' to use this name for an external procedure.
Rename(Path1, Path2)
Rename: INTEGER(KIND=1)
function.
Path1: CHARACTER
; scalar; INTENT(IN).
Path2: CHARACTER
; scalar; INTENT(IN).
Intrinsic groups: badu77
.
Description:
Renames the file Path1 to Path2.
A null character (`CHAR(0)') marks the end of
the names in Path1 and Path2---otherwise,
trailing blanks in Path1 and Path2 are ignored.
See rename(2)
.
Returns 0 on success or a non-zero error code.
Due to the side effects performed by this intrinsic, the function form is not recommended.
For information on other intrinsics with the same name: See section Rename Intrinsic (subroutine).
Secnds(T)
Secnds: REAL(KIND=1)
function.
T: REAL(KIND=1)
; scalar; INTENT(IN).
Intrinsic groups: vxt
.
Description:
Returns the local time in seconds since midnight minus the value T.
Signal(Number, Handler)
Signal: INTEGER(KIND=7)
function.
Number: INTEGER
; scalar; INTENT(IN).
Handler: Signal handler (INTEGER FUNCTION
or SUBROUTINE
)
or dummy/global INTEGER(KIND=1)
scalar.
Intrinsic groups: badu77
.
Description:
If Handler is a an EXTERNAL
routine, arranges for it to be
invoked with a single integer argument (of system-dependent length)
when signal Number occurs.
If Handler is an integer, it can be
used to turn off handling of signal Number or revert to its default
action.
See signal(2)
.
Note that Handler will be called using C conventions,
so the value of its argument in Fortran terms
is obtained by applying %LOC()
(or LOC()) to it.
The value returned by signal(2)
is returned.
Due to the side effects performed by this intrinsic, the function form is not recommended.
Warning: If the returned value is stored in
an INTEGER(KIND=1)
(default INTEGER
) argument,
truncation of the original return value occurs on some systems
(such as Alphas, which have 64-bit pointers but 32-bit default integers),
with no warning issued by g77
under normal circumstances.
Therefore, the following code fragment might silently fail on some systems:
INTEGER RTN EXTERNAL MYHNDL RTN = SIGNAL(signum, MYHNDL) ... ! Restore original handler: RTN = SIGNAL(signum, RTN)
The reason for the failure is that `RTN' might not hold all the information on the original handler for the signal, thus restoring an invalid handler. This bug could manifest itself as a spurious run-time failure at an arbitrary point later during the program's execution, for example.
Warning: Use of the libf2c
run-time library function
`signal_' directly
(such as via `EXTERNAL SIGNAL')
requires use of the %VAL()
construct
to pass an INTEGER
value
(such as `SIG_IGN' or `SIG_DFL')
for the Handler argument.
However, while `RTN = SIGNAL(signum, %VAL(SIG_IGN))'
works when `SIGNAL' is treated as an external procedure
(and resolves, at link time, to libf2c
's `signal_' routine),
this construct is not valid when `SIGNAL' is recognized
as the intrinsic of that name.
Therefore, for maximum portability and reliability, code such references to the `SIGNAL' facility as follows:
INTRINSIC SIGNAL ... RTN = SIGNAL(signum, SIG_IGN)
g77
will compile such a call correctly,
while other compilers will generally either do so as well
or reject the `INTRINSIC SIGNAL' statement via a diagnostic,
allowing you to take appropriate action.
For information on other intrinsics with the same name: See section Signal Intrinsic (subroutine).
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL SinD' to use this name for an external procedure.
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL SnglQ' to use this name for an external procedure.
SymLnk(Path1, Path2)
SymLnk: INTEGER(KIND=1)
function.
Path1: CHARACTER
; scalar; INTENT(IN).
Path2: CHARACTER
; scalar; INTENT(IN).
Intrinsic groups: badu77
.
Description:
Makes a symbolic link from file Path1 to Path2.
A null character (`CHAR(0)') marks the end of
the names in Path1 and Path2---otherwise,
trailing blanks in Path1 and Path2 are ignored.
Returns 0 on success or a non-zero error code
(ENOSYS
if the system does not provide symlink(2)
).
Due to the side effects performed by this intrinsic, the function form is not recommended.
For information on other intrinsics with the same name: See section SymLnk Intrinsic (subroutine).
System(Command)
System: INTEGER(KIND=1)
function.
Command: CHARACTER
; scalar; INTENT(IN).
Intrinsic groups: badu77
.
Description:
Passes the command Command to a shell (see system(3)
).
Returns the value returned by
system(3)
, presumably 0 if the shell command succeeded.
Note that which shell is used to invoke the command is system-dependent
and environment-dependent.
Due to the side effects performed by this intrinsic, the function form is not recommended. However, the function form can be valid in cases where the actual side effects performed by the call are unimportant to the application.
For example, on a UNIX system, `SAME = SYSTEM('cmp a b')'
does not perform any side effects likely to be important to the
program, so the programmer would not care if the actual system
call (and invocation of cmp
) was optimized away in a situation
where the return value could be determined otherwise, or was not
actually needed (`SAME' not actually referenced after the
sample assignment statement).
For information on other intrinsics with the same name: See section System Intrinsic (subroutine).
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL TanD' to use this name for an external procedure.
CALL Time(Time)
Time: CHARACTER*8
; scalar; INTENT(OUT).
Intrinsic groups: vxt
.
Description:
Returns in Time a character representation of the current time as
obtained from ctime(3)
.
See section Fdate Intrinsic (subroutine) for an equivalent routine.
For information on other intrinsics with the same name: See section Time Intrinsic (UNIX).
UMask(Mask)
UMask: INTEGER(KIND=1)
function.
Mask: INTEGER
; scalar; INTENT(IN).
Intrinsic groups: badu77
.
Description:
Sets the file creation mask to Mask and returns the old value.
See umask(2)
.
Due to the side effects performed by this intrinsic, the function form is not recommended.
For information on other intrinsics with the same name: See section UMask Intrinsic (subroutine).
Unlink(File)
Unlink: INTEGER(KIND=1)
function.
File: CHARACTER
; scalar; INTENT(IN).
Intrinsic groups: badu77
.
Description:
Unlink the file File.
A null character (`CHAR(0)') marks the end of
the name in File---otherwise,
trailing blanks in File are ignored.
Returns 0 on success or a non-zero error code.
See unlink(2)
.
Due to the side effects performed by this intrinsic, the function form is not recommended.
For information on other intrinsics with the same name: See section Unlink Intrinsic (subroutine).
This intrinsic is not yet implemented. The name is, however, reserved as an intrinsic. Use `EXTERNAL ZExt' to use this name for an external procedure.
Go to the first, previous, next, last section, table of contents.