Go to the first, previous, next, last section, table of contents.


The GNU Fortran Compiler

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!

Compiler Limits

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.

Compiler Types

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)
Same as float type.
REAL(KIND=2)
Same as whatever floating-point type that is twice the size of a float---usually, this is a double.
INTEGER(KIND=1)
Same as an integral type that is occupies the same amount of memory storage as float---usually, this is either an int or a long int.
LOGICAL(KIND=1)
Same gcc type as INTEGER(KIND=1).
INTEGER(KIND=2)
Twice the size, and usually nearly twice the range, as INTEGER(KIND=1)---usually, this is either a long int or a long long int.
LOGICAL(KIND=2)
Same gcc type as INTEGER(KIND=2).
INTEGER(KIND=3)
Same gcc type as signed char.
LOGICAL(KIND=3)
Same gcc type as INTEGER(KIND=3).
INTEGER(KIND=6)
Twice the size, and usually nearly twice the range, as INTEGER(KIND=3)---usually, this is a short.
LOGICAL(KIND=6)
Same gcc type as INTEGER(KIND=6).
COMPLEX(KIND=1)
Two REAL(KIND=1) scalars (one for the real part followed by one for the imaginary part).
COMPLEX(KIND=2)
Two REAL(KIND=2) scalars.
numeric-type*n
(Where numeric-type is any type other than CHARACTER.) Same as whatever gcc type occupies n times the storage space of a gcc char item.
DOUBLE PRECISION
Same as REAL(KIND=2).
DOUBLE COMPLEX
Same as 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.

Compiler Constants

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.

Compiler Intrinsics

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.

Intrinsic Groups

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.

Deleted
No intrinsics are recognized as belonging to that group.
Disabled
Intrinsics are recognized as belonging to the group, but references to them (other than via the INTRINSIC statement) are disallowed through that group.
Hidden
Intrinsics in that group are recognized and enabled (if implemented) only if the first mention of the actual name of an intrinsic in a program unit is in an INTRINSIC statement.
Enabled
Intrinsics in that group are recognized and enabled (if implemented).

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
UNIX intrinsics having inappropriate forms (usually functions that have intended side effects).
gnu
Intrinsics the GNU Fortran language supports that are extensions to the Fortran standards (77 and 90).
f2c
Intrinsics supported by AT&T's f2c converter and/or libf2c.
f90
Fortran 90 intrinsics.
mil
MIL-STD 1753 intrinsics (MVBITS, IAND, BTEST, and so on).
unix
UNIX intrinsics (IARGC, EXIT, ERF, and so on).
vxt
VAX/VMS FORTRAN (current as of v4) intrinsics.

Other Intrinsics

g77 supports intrinsics other than those in the GNU Fortran language proper. This set of intrinsics is described below.

ACosD Intrinsic

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.

AIMax0 Intrinsic

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.

AIMin0 Intrinsic

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.

AJMax0 Intrinsic

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.

AJMin0 Intrinsic

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.

ASinD Intrinsic

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.

ATan2D Intrinsic

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.

ATanD Intrinsic

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.

BITest Intrinsic

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.

BJTest Intrinsic

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 Intrinsic

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 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 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 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 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 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 Intrinsic (function)

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 Intrinsic (function)

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).

CosD Intrinsic

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.

DACosD Intrinsic

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.

DASinD Intrinsic

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.

DATan2D Intrinsic

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.

DATanD Intrinsic

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.

Date Intrinsic

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.

DbleQ Intrinsic

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 Intrinsic

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 Intrinsic

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.

DCosD 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 Intrinsic

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.

DFlotI 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.

DFlotJ Intrinsic

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 Intrinsic

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 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.

DSinD Intrinsic

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.

DTanD Intrinsic

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 Intrinsic (function)

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 Intrinsic (function)

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 Intrinsic (function)

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).

FloatI Intrinsic

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.

FloatJ Intrinsic

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 Intrinsic (function)

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 Intrinsic (function)

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).

IDate Intrinsic (VXT)

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).

IIAbs Intrinsic

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.

IIAnd Intrinsic

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.

IIBClr Intrinsic

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.

IIBits Intrinsic

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.

IIBSet Intrinsic

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.

IIDiM Intrinsic

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.

IIDInt Intrinsic

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.

IIDNnt Intrinsic

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.

IIEOr Intrinsic

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.

IIFix Intrinsic

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.

IInt Intrinsic

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.

IIOr Intrinsic

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.

IIQint Intrinsic

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.

IIQNnt Intrinsic

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.

IIShftC Intrinsic

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.

IISign Intrinsic

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.

IMax0 Intrinsic

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.

IMax1 Intrinsic

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.

IMin0 Intrinsic

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.

IMin1 Intrinsic

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.

IMod Intrinsic

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.

INInt Intrinsic

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.

INot Intrinsic

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.

IZExt Intrinsic

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.

JIAbs Intrinsic

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.

JIAnd Intrinsic

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.

JIBClr Intrinsic

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.

JIBits Intrinsic

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.

JIBSet Intrinsic

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.

JIDiM Intrinsic

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.

JIDInt Intrinsic

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.

JIDNnt Intrinsic

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.

JIEOr Intrinsic

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.

JIFix Intrinsic

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.

JInt Intrinsic

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.

JIOr Intrinsic

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.

JIQint Intrinsic

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.

JIQNnt Intrinsic

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.

JIShft Intrinsic

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.

JIShftC Intrinsic

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.

JISign Intrinsic

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.

JMax0 Intrinsic

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.

JMax1 Intrinsic

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.

JMin0 Intrinsic

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.

JMin1 Intrinsic

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.

JMod Intrinsic

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.

JNInt Intrinsic

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.

JNot Intrinsic

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.

JZExt Intrinsic

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 Intrinsic (function)

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 Intrinsic (function)

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).

QAbs Intrinsic

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.

QACos Intrinsic

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.

QACosD Intrinsic

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.

QASin Intrinsic

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.

QASinD Intrinsic

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.

QATan Intrinsic

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.

QATan2 Intrinsic

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.

QATan2D Intrinsic

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.

QATanD Intrinsic

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.

QCos Intrinsic

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.

QCosD Intrinsic

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.

QCosH Intrinsic

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.

QDiM Intrinsic

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.

QExp Intrinsic

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.

QExt Intrinsic

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.

QExtD Intrinsic

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.

QFloat Intrinsic

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.

QInt Intrinsic

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.

QLog Intrinsic

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.

QLog10 Intrinsic

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.

QMax1 Intrinsic

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.

QMin1 Intrinsic

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.

QMod Intrinsic

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.

QNInt Intrinsic

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.

QSin Intrinsic

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.

QSinD Intrinsic

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.

QSinH Intrinsic

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.

QSqRt Intrinsic

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.

QTan Intrinsic

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.

QTanD Intrinsic

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.

QTanH Intrinsic

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 Intrinsic (function)

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 Intrinsic

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 Intrinsic (function)

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).

SinD Intrinsic

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.

SnglQ Intrinsic

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 Intrinsic (function)

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 Intrinsic (function)

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).

TanD Intrinsic

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.

Time Intrinsic (VXT)

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 Intrinsic (function)

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 Intrinsic (function)

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).

ZExt Intrinsic

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.