# 15 FUNCTIONS AND SUBROUTINES

## 15.1 Categories of Functions and Subroutines

### 15.1.1 Procedures.

Functions and subroutines are procedures. There are four categories of procedures:
1. Intrinsic functions
2. Statement functions
3. External functions
4. Subroutines

Intrinsic functions, statement functions, and external functions are referred to collectively as functions.

External functions and subroutines are referred to collectively as external procedures.

### 15.1.2 External Functions.

There are two categories of external functions:
1. External functions specified in function subprograms
2. External functions specified by means other than FORTRAN subprograms

### 15.1.3 Subroutines.

There are two categories of subroutines:
1. Subroutines specified in subroutine subprograms
2. Subroutines specified by means other than FORTRAN subprograms

### 15.1.4 Dummy Procedure.

A dummy procedure is a dummy argument that is identified as a procedure ( 18.2.11).

## 15.2 Referencing a Function

A function is referenced in an expression and supplies a value to the expression. The value supplied is the value of the function.

An intrinsic function may be referenced in the main program or in any procedure subprogram of an executable program.

A statement function may be referenced only in the program unit in which the statement function statement appears.

An external function specified by a function subprogram may be referenced within any other procedure subprogram or the main program of the executable program. A subprogram must not reference itself, either directly or indirectly.

An external function specified by means other than a subprogram may be referenced within any procedure subprogram or the main program of the executable program.

If a character function is referenced in a program unit, the function length specified in the program unit must be an integer constant expression.

### 15.2.1 Form of a Function Reference.

A function reference is used to reference an intrinsic function, statement function, or external function.

The form of a function reference is:

`fun ( [a [,a]...] )`
• where: fun is the symbolic name of a function or a dummy procedure
• a is an actual argument

The type of the result of a statement function or external function reference is the same as the type of the function name. The type is specified in the same manner as for variables and arrays ( 4.1.2). The type of the result of an intrinsic function is specified in Table 5 ( 15.10).

### 15.2.2 Execution of a Function Reference.

A function reference may appear only as a primary in an arithmetic, logical, or character expression. Execution of a function reference in an expression causes the evaluation of the function identified by fun.

Return of control from a referenced function completes execution of the function reference. The value of the function is available to the referencing expression.

## 15.3 Intrinsic Functions

Intrinsic functions are supplied by the processor and have a special meaning. The specific names that identify the intrinsic functions, their generic names, function definitions, type of arguments, and type of results appear in Table 5.

An IMPLICIT statement does not change the type of an intrinsic function.

### 15.3.1 Specific Names and Generic Names.

Generic names simplify the referencing of intrinsic functions, because the same function name may be used with more than one type of argument. Only a specific intrinsic function name may be used as an actual argument when the argument is an intrinsic function.

If a generic name is used to reference an intrinsic function, the type of the result (except for intrinsic functions performing type conversion, nearest integer, and absolute value with a complex argument) is the same as the type of the argument.

For those intrinsic functions that have more than one argument, all arguments must be of the same type.

If the specific name or generic name of an intrinsic function appears in the dummy argument list of a function or subroutine in a subprogram, that symbolic name does not identify an intrinsic function in the program unit. The data type identified with the symbolic name is specified in the same manner as for variables and arrays ( 4.1.2).

A name in an INTRINSIC statement must be the specific name or generic name of an intrinsic function.

### 15.3.2 Referencing an Intrinsic Function.

An intrinsic function is referenced by using its reference as a primary in an expression. For each intrinsic function described in Table 5, execution of an intrinsic function reference causes the actions specified in Table 5, and the result depends on the values of the actual arguments. The resulting value is available to the expression that contains the function reference.

The actual arguments that constitute the argument list must agree in order, number, and type with the specification in Table 5 and may be any expression of the specified type. An actual argument in an intrinsic function reference may be any expression except a character expression involving concatenation of an operand whose length specification is an asterisk in parentheses unless the operand is the symbolic name of a constant.

A specific name of an intrinsic function that appears in an INTRINSIC statement may be used as an actual argument in an external procedure reference; however, the names of intrinsic functions for type conversion, lexical relationship, and for choosing the largest or smallest value must not be used as actual arguments. Note that such an appearance does not cause the intrinsic function to be classified as an external function ( 18.2.10).

### 15.3.3 Intrinsic Function Restrictions.

Arguments for which the result is not mathematically defined or exceeds the numeric range of the processor cause the result of the function to become undefined.

Restrictions on the range of arguments and results for intrinsic functions are described in 15.10.1.

## 15.4 Statement Function

A statement function is a procedure specified by a single statement that is similar in form to an arithmetic, logical, or character assignment statement. A statement function statement must appear only after the specification statements and before the first executable statement of the program unit in which it is referenced ( 3.5).

A statement function statement is classified as a nonexecutable statement; it is not a part of the normal execution sequence.

### 15.4.1 Form of a Statement Function Statement.

The form of a statement function statement is:
`fun ( [d [,d]...] ) = e`
• where: fun is the symbolic name of the statement function
• d is a statement function dummy argument
• e is an expression

The relationship between fun and e must conform to the assignment rules in 10.1, 10.2, and 10.4. Note that the type of the expression may be different from the type of the statement function name.

Each d is a variable name called a statement function dummy argument. The statement function dummy argument list serves only to indicate order, number, and type of arguments for the statement function. The variable names that appear as dummy arguments of a statement function have a scope of that statement ( 18.1). A given symbolic name may appear only once in any statement function dummy argument list. The symbolic name of a statement function dummy argument may be used to identify other dummy arguments of the same type in different statement function statements. The name may also be used to identify a variable of the same type appearing elsewhere in the program unit, including its appearance as a dummy argument in a FUNCTION, SUBROUTINE, or ENTRY statement. The name must not be used to identify any other entity in the program unit except a common block.

Each primary of the expression e must be one of the following:

1. A constant
2. The symbolic name of a constant
3. A variable reference
4. An array element reference
5. An intrinsic function reference
6. A reference to a statement function for which the statement function statement appears in preceding lines of the program unit
7. An external function reference
8. A dummy procedure reference
9. An expression enclosed in parentheses that meets all of the requirements specified for the expression e

Each variable reference may be either a reference to a dummy argument of the statement function or a reference to a variable that appears within the same program unit as the statement function statement.

If a statement function dummy argument name is the same as the name of another entity, the appearance of that name in the expression of a statement function statement is a reference to the statement function dummy argument. A dummy argument that appears in a FUNCTION or SUBROUTINE statement may be referenced in the expression of a statement function statement within the subprogram. A dummy argument that appears in an ENTRY statement that precedes a statement function statement may be referenced in the expression of the statement function statement within the subprogram.

### 15.4.2 Referencing a Statement Function.

A statement function is referenced by using its function reference as a primary in an expression.

Execution of a statement function reference results in:

1. evaluation of actual arguments that are expressions,
2. association of actual arguments with the corresponding dummy arguments,
3. evaluation of the expression e , and
4. conversion, if necessary, of an arithmetic expression value to the type of the statement function according to the assignment rules in 10.1 or a change, if necessary, in the length of a character expression value according to the rules in 10.4.

The resulting value is available to the expression that contains the function reference.

The actual arguments, which constitute the argument list, must agree in order, number, and type with the corresponding dummy arguments. An actual argument in a statement function reference may be any expression except a character expression involving concatenation of an operand whose length specification is an asterisk in parentheses unless the operand is the symbolic name of a constant.

When a statement function reference is executed, its actual arguments must be defined.

### 15.4.3 Statement Function Restrictions.

A statement function may be referenced only in the program unit that contains the statement function statement.

A statement function statement must not contain a reference to another statement function that appears following the reference in the sequence of lines in the program unit. The symbolic name used to identify a statement function must not appear as a symbolic name in any specification statement except in a type-statement (to specify the type of the function) or as the name of a common block in the same program unit.

An external function reference in the expression of a statement function statement must not cause a dummy argument of the statement function to become undefined or redefined.

The symbolic name of a statement function is a local name ( 18.1.2) and must not be the same as the name of any other entity in the program unit except the name of a common block.

The symbolic name of a statement function may not be an actual argument. It must not appear in an EXTERNAL statement.

A statement function statement in a function subprogram must not contain a function reference to the name of the function subprogram or an entry name in the function subprogram.

The length specification of a character statement function or statement function dummy argument of type character must be an integer constant expression.

## 15.5 External Functions

An external function is specified externally to the program unit that references it. An external function is a procedure and may be specified in a function subprogram or by some other means.

### 15.5.1 Function Subprogram and FUNCTION Statement.

A function subprogram specifies one or more external functions ( 15.7). A function subprogram is a program unit that has a FUNCTION statement as its first statement. The form of a function subprogram is as described in 2.4 and 3.5, except as noted in 15.5.3 and 15.7.4.

The form of a FUNCTION statement is:

`[typ] FUNCTION fun ( [d [,d]...] )`
• where: typ is one of INTEGER, REAL, DOUBLE PRECISION, COMPLEX, LOGICAL, or CHARACTER [*len] where len is the length specification of the result of the character function. len may have any of the forms allowed in a CHARACTER statement ( 8.4.2) except that an integer constant expression must not include the symbolic name of a constant. If a length is not specified in a CHARACTER FUNCTION statement, the character function has a length of one.
• fun is the symbolic name of the function subprogram in which the FUNCTION statement appears. fun is an external function name.
• d is a variable name, array name, or dummy procedure name. d is a dummy argument.

The symbolic name of a function subprogram or an associated entry name of the same type must appear as a variable name in the function subprogram. During every execution of the external function, this variable must become defined and, once defined, may be referenced or become redefined. The value of this variable when a RETURN or END statement is executed in the subprogram is the value of the function. If this variable is a character variable with a length specification that is an asterisk in parentheses, it must not appear as an operand for concatenation except in a character assignment statement ( 10.4).

An external function in a function subprogram may define one or more of its dummy arguments to return values in addition to the value of the function.

### 15.5.2 Referencing an External Function.

An external function is referenced by using its reference as a primary in an expression.

#### 15.5.2.1 Execution of an External Function Reference.

Execution of an external function reference results in:
1. evaluation of actual arguments that are expressions,
2. association of actual arguments with the corresponding dummy arguments, and
3. the actions specified by the referenced function.

The type of the function name in the function reference must be the same as the type of the function name in the referenced function. The length of the character function in a character function reference must be the same as the length of the character function in the referenced function.

When an external function reference is executed, the function must be one of the external functions in the executable program.

#### 15.5.2.2 Actual Arguments for an External Function.

The actual arguments in an external function reference must agree in order, number, and type with the corresponding dummy arguments in the referenced function. The use of a subroutine name as an actual argument is an exception to the rule requiring agreement of type because subroutine names do not have a type.

An actual argument in Tan external function reference must be one of the following:

1. An expression except a character expression involving concatenation of an operand whose length specification is an asterisk in parentheses unless the operand is the symbolic name of a constant
2. An array name
3. An intrinsic function name
4. An external procedure name
5. A dummy procedure name

Note that an actual argument in a function reference may be a dummy argument that appears in a dummy argument list within the subprogram containing the reference.

### 15.5.3 Function Subprogram Restrictions.

A FUNCTION statement must appear only as the first statement of a function subprogram. A function subprogram may contain any other statement except a BLOCK DATA, SUBROUTINE, or PROGRAM statement.

The symbolic name of an external function is a global name ( 18.1.1) and must not be the same as any other global name or any local name, except a variable name, in the function subprogram.

Within a function subprogram, the symbolic name of a function specified by a FUNCTION or ENTRY statement must not appear in any other nonexecutable statement, except a type-statement. In an executable statement, such a name may appear only as a variable.

If the type of a function is specified in a FUNCTION statement, the function name must not appear in a type-statement. Note that a name must not have its type explicitly specified more than once in a program unit.

If the name of a function subprogram is of type character, each entry name in the function subprogram must be of type character. If the name of the function subprogram or any entry in the subprogram has a length of (*) declared, all such entities must have a length of (*) declared; otherwise, all such entities must have a length specification of the same integer value.

In a function subprogram, the symbolic name of a dummy argument is local to the program unit and must not appear in an EQUIVALENCE, PARAMETER, SAVE, INTRINSIC, DATA, or COMMON statement, except as a common block name.

A character dummy argument whose length specification is an asterisk in parentheses must not appear as an operand for concatenation, except in a character assignment statement ( 10.4).

A function specified in a subprogram may be referenced within any other procedure subprogram or the main program of the executable program. A function subprogram must not reference itself, either directly or indirectly.

## 15.6 Subroutines

A subroutine is specified externally to the program unit that references it. A subroutine is a procedure and may be specified in a subroutine subprogram or by some other means.

### 15.6.1 Subroutine Subprogram and SUBROUTINE Statement.

A subroutine subprogram specifies one or more subroutines ( 15.7). A subroutine subprogram is a program unit that has a SUBROUTINE statement as its first statement. The form of a subroutine subprogram is as described in 2.4 and 3.5, except as noted in 15.6.3 and 15.7.4.

The form of a SUBROUTINE statement is:

`SUBROUTINE sub [( [d [,d]...] )]`
• where: sub is the symbolic name of the subroutine subprogram in which the SUBROUTINE statement appears. sub is a subroutine name.
• d is a variable name, array name, or dummy procedure name, or is an asterisk ( 15.9.3.5). d is a dummy argument.

Note that if there are no dummy arguments, either of the forms sub or sub() may be used in the SUBROUTINE statement. A subroutine that is specified by either form may be referenced by a CALL statement of the form CALL sub or CALL sub().

One or more dummy arguments of a subroutine in a subprogram may become defined or redefined to return results.

### 15.6.2 Subroutine Reference.

A subroutine is referenced by a CALL statement.

#### 15.6.2.1 Form of a CALL Statement.

The form of a CALL statement is:
`CALL sub [( [a [,a]...] )]`
• where: sub is the symbolic name of a subroutine or dummy procedure
• a is an actual argument

#### 15.6.2.2 Execution of a CALL Statement.

Execution of a CALL statement results in
1. evaluation of actual arguments that are expressions,
2. association of actual arguments with the corresponding dummy arguments, and
3. the actions specified by the referenced subroutine.

Return of control from the referenced subroutine completes execution of the CALL statement.

A subroutine specified in a subprogram may be referenced within any other procedure subprogram or the main program of the executable program. A subprogram must not reference itself, either directly or indirectly.

When a CALL statement is executed, the referenced subroutine must be one of the subroutines specified in subroutine subprograms or by other means in the executable program.

#### 15.6.2.3 Actual Arguments for a Subroutine.

The actual arguments in a subroutine reference must agree in order, number, and type with the corresponding dummy arguments in the dummy argument list of the referenced subroutine. The use of a subroutine name or an alternate return specifier as an actual argument is an exception to the rule requiring agreement of type.

An actual argument in a subroutine reference must be one of the following:

1. An expression except a character expression involving concatenation of an operand whose length specification is an asterisk in parentheses unless the operand is the symbolic name of a constant
2. An array name
3. An intrinsic function name
4. An external procedure name
5. A dummy procedure name
6. An alternate return specifier, of the form *s , where s is the statement label of an executable statement that appears in the same program unit as the CALL statement ( 15.8.3)

Note that an actual argument in a subroutine reference may be a dummy argument name that appears in a dummy argument list within the subprogram containing the reference. An asterisk dummy argument must not be used as an actual argument in a subprogram reference.

### 15.6.3 Subroutine Subprogram Restrictions.

A SUBROUTINE statement must appear only as the first statement of a subroutine subprogram. A subroutine subprogram may contain any other statement except a BLOCK DATA, FUNCTION, or PROGRAM statement.

The symbolic name of a subroutine is a global name ( 18.1.1) and must not be the same as any other global name or any local name in the program unit.

In a subroutine subprogram, the symbolic name of a dummy argument is local to the program unit and must not appear in an EQUIVALENCE, PARAMETER, SAVE, INTRINSIC, DATA, or COMMON statement, except as a common block name.

A character dummy argument whose length specification is an asterisk in parentheses must not appear as an operand for concatenation, except in a character assignment statement ( 10.4).

## 15.7 ENTRY Statement

An ENTRY statement permits a procedure reference to begin with a particular executable statement within the function or subroutine subprogram in which the ENTRY statement appears. It may appear anywhere within a function subprogram after the FUNCTION statement or within a subroutine subprogram after the SUBROUTINE statement, except that an ENTRY statement must not appear between a block IF statement and its corresponding END IF statement, or between a DO statement and the terminal statement of its DO-loop.

Optionally, a subprogram may have one or more ENTRY statements.

An ENTRY statement is classified as a nonexecutable statement.

### 15.7.1 Form of an ENTRY Statement.

The form of an ENTRY statement is:
`ENTRY en [( [d [,d]...] )]`
• where: en is the symbolic name of an entry in a function or subroutine subprogram and is called an entry name. If the ENTRY statement appears in a subroutine subprogram, en is a subroutine name. If the ENTRY statement appears in a function subprogram, en is an external function name.
• d is a variable name, array name, or dummy procedure name, or is an asterisk. d is a dummy argument. An asterisk is permitted in an ENTRY statement only in a subroutine subprogram.

Note that if there are no dummy arguments, either of the forms en or en() may be used in the ENTRY statement. A function that is specified by either form must be referenced by the form en() ( 15.2.1). A subroutine that is specified by either form may be referenced by a CALL statement of the form CALL en or CALL en() .

The entry name en in a function subprogram may appear in a type-statement.

### 15.7.2 Referencing External Procedure by Entry Name.

An entry name in an ENTRY statement in a function subprogram identifies an external function within the executable program and may be referenced as an external function ( 15.5.2). An entry name in an ENTRY statement in a subroutine subprogram identifies a subroutine within the executable program and may be referenced as a subroutine ( 15.6.2).

When an entry name en is used to reference a procedure, execution of the procedure begins with the first executable statement that follows the ENTRY statement whose entry name is en .

An entry name is available for reference in any program unit of an executable program, except in the program unit that contains the entry name in an ENTRY statement.

The order, number, type, and names of the dummy arguments in an ENTRY statement may be different from the order, number, type, and names of the dummy arguments in the FUNCTION statement or SUBROUTINE statement and other ENTRY statements in the same subprogram. However, each reference to a function or subroutine must use an actual argument list that agrees in order, number, and type with the dummy argument list in the corresponding FUNCTION, SUBROUTINE, or ENTRY statement. The use of a subroutine name or an alternate return specifier as an actual argument is an exception to the rule requiring agreement of type.

### 15.7.3 Entry Association.

Within a function subprogram, all variables whose names are also the names of entries are associated with each other and with the variable, if any, whose name is also the name of the function subprogram ( 17.1.3). Therefore, any such variable that becomes defined causes all associated variables of the same type to become defined and all associated variables of different type to become undefined. Such variables are not required to be of the same type unless the type is character, but the variable whose name is used to reference the function must be in a defined state when a RETURN or END statement is executed in the subprogram. An associated variable of a different type must not become defined during the execution of the function reference.

### 15.7.4 ENTRY Statement Restrictions.

Within a subprogram, an entry name must not appear both as an entry name in an ENTRY statement and as a dummy argument in a FUNCTION, SUBROUTINE, or ENTRY statement and must not appear in an EXTERNAL statement.

In a function subprogram, a variable name that is the same as an entry name must not appear in any statement that precedes the appearance of the entry name in an ENTRY statement, except in a type-statement.

If an entry name in a function subprogram is of type character, each entry name and the name of the function subprogram must be of type character. If the name of the function subprogram or any entry in the subprogram has a length of (*) declared, all such entities must have a length of (*) declared; otherwise, all such entities must have a length specification of the same integer value.

In a subprogram, a name that appears as a dummy argument in an ENTRY statement must not appear in an executable statement preceding that ENTRY statement unless it also appears in a FUNCTION, SUBROUTINE, or ENTRY statement that precedes the executable statement.

In a subprogram, a name that appears as a dummy argument in an ENTRY statement must not appear in the expression of a statement function statement unless the name is also a dummy argument of the statement function, appears in a FUNCTION or SUBROUTINE statement, or appears in an ENTRY statement that precedes the statement function statement.

If a dummy argument appears in an executable statement, the execution of the executable statement is permitted during the execution of a reference to the function or subroutine only if the dummy argument appears in the dummy argument list of the procedure name referenced. Note that the association of dummy arguments with actual arguments is not retained between references to a function or subroutine.

## 15.8 RETURN Statement

A RETURN statement causes return of control to the referencing program unit and may appear only in a function subprogram or subroutine subprogram.

### 15.8.1 Form of a RETURN Statement.

The form of a RETURN statement in a function subprogram is:
`RETURN`
The form of a RETURN statement in a subroutine subprogram is:
`RETURN [e]`
where e is an integer expression.

### 15.8.2 Execution of a RETURN Statement.

Execution of a RETURN statement terminates the reference of a function or subroutine subprogram. Such subprograms may contain more than one RETURN statement; however, a subprogram need not contain a RETURN statement. Execution of an END statement in a function or subroutine subprogram has the same effect as executing a RETURN statement in the subprogram.

In the execution of an executable program, a function or subroutine subprogram must not be referenced a second time without the prior execution of a RETURN or END statement in that procedure.

Execution of a RETURN statement in a function subprogram causes return of control to the currently referencing program unit. The value of the function ( 15.5) must be defined and is available to the referencing program unit.

Execution of a RETURN statement in a subroutine subprogram causes return of control to the currently referencing program unit. Return of control to the referencing program unit completes execution of the CALL statement.

Execution of a RETURN statement terminates the association between the dummy arguments of the external procedure in the subprogram and the current actual arguments.

### 15.8.3 Alternate Return.

If e is not specified in a RETURN statement, or if the value of e is less than one or greater than the number of asterisks in the SUBROUTINE or subroutine ENTRY statement that specifies the currently referenced name, control returns to the CALL statement that initiated the subprogram reference and this completes the execution of the CALL statement.

If 1 <= e <= n , where n is the number of asterisks in the SUBROUTINE or subroutine ENTRY statement that specifies the currently referenced name, the value of e identifies the eth asterisk in the dummy argument list. Control is returned to the statement identified by the alternate return specifier in the CALL statement that is associated with the eth asterisk in the dummy argument list of the currently referenced name. This completes the execution of the CALL statement.

### 15.8.4 Definition Status.

Execution of a RETURN statement (or END statement) within a subprogram causes all entities within the subprogram to become undefined, except for the following:
1. Entities specified by SAVE statements
2. Entities in blank common
3. Initially defined entities that have neither been redefined or become undefined
4. Entities in a named common block that appears in the subprogram and appears in at least one other program unit that is referencing, either directly or indirectly, the subprogram

Note that if a named common block appears in the main program, the entities in the named common block do not become undefined at the execution of any RETURN statement in the executable program.

## 15.9 Arguments and Common Blocks

Arguments and common blocks provide means of communication between the referencing program unit and the referenced procedure.

Data may be communicated to a statement function or intrinsic function by an argument list. Data may be communicated to and from an external procedure by an argument list or common blocks. Procedure names may be communicated to an external procedure only by an argument list.

A dummy argument appears in the argument list of a procedure. An actual argument appears in the argument list of a procedure reference.

The number of actual arguments must be the same as the number of dummy arguments in the procedure referenced.

### 15.9.1 Dummy Arguments.

Statement functions, function subprograms, and subroutine subprograms use dummy arguments to indicate the types of actual arguments and whether each argument is a single value, array of values, procedure, or statement label. Note that a statement function dummy argument may be only a variable.

Each dummy argument is classified as a variable, array, dummy procedure, or asterisk. Dummy argument names may appear wherever an actual name of the same class (Section 18) and type may appear, except where they are explicitly prohibited.

Dummy argument names of type integer may appear in adjustable dimensions in dummy array declarators ( 5.5.1). Dummy argument names must not appear in EQUIVALENCE, DATA, PARAMETER, SAVE, INTRINSIC, or COMMON statements, except as common block names. A dummy argument name must not be the same as the procedure name appearing in a FUNCTION, SUBROUTINE, ENTRY, or statement function statement in the same program unit.

### 15.9.2 Actual Arguments.

Actual arguments specify the entities that are to be associated with the dummy arguments for a particular reference of a subroutine or function. An actual argument must not be the name of a statement function in the program unit containing the reference. Actual arguments may be constants, symbolic names of constants, function references, expressions involving operators, and expressions enclosed in parentheses if and only if the associated dummy argument is a variable that is not defined during execution of the referenced external procedure.

The type of each actual argument must agree with the type of its associated dummy argument, except when the actual argument is a subroutine name ( 15.9.3.4) or an alternate return specifier ( 15.6.2.3).

### 15.9.3 Association of Dummy and Actual Arguments.

At the execution of a function or subroutine reference, an association is established between the corresponding dummy and actual arguments. The first dummy argument becomes associated with the first actual argument, the second dummy argument becomes associated with the second actual argument, etc.

All appearances within a function or subroutine subprogram of a dummy argument whose name appears in the dummy argument list of the procedure name referenced become associated with the actual argument when a reference to the function or subroutine is executed.

A valid association occurs only if the type of the actual argument is the same as the type of the corresponding dummy argument. A subroutine name has no type and must be associated with a dummy procedure name. An alternate return specifier has no type and must be associated with an asterisk.

If an actual argument is an expression, it is evaluated just before the association of arguments takes place.

If an actual argument is an array element name, its subscript is evaluated just before the association of arguments takes place. Note that the subscript value remains constant as long as that association of arguments persists, even if the subscript contains variables that are redefined during the association.

If an actual argument is a character substring name, its substring expressions are evaluated just before the association of arguments takes place. Note that the value of each of the substring expressions remains constant as long as that association of arguments persists, even if the substring expression contains variables that are redefined during the association.

If an actual argument is an external procedure name, the procedure must be available at the time a reference to it is executed.

If an actual argument becomes associated with a dummy argument that appears in an adjustable dimension ( 5.5.1), the actual argument must be defined with an integer value at the time the procedure is referenced.

A dummy argument is undefined if it is not currently associated with an actual argument. An adjustable array is undefined if the dummy argument array is not currently associated with an actual argument array or if any variable appearing in the adjustable array declarator is not currently associated with an actual argument and is not in a common block.

Argument association may be carried through more than one level of procedure reference. A valid association exists at the last level only if a valid association exists at all intermediate levels. Argument association within a program unit terminates at the execution of a RETURN or END statement in the program unit. Note that there is no retention of argument association between one reference of a subprogram and the next reference of the subprogram.

#### 15.9.3.1 Length of Character Dummy and Actual Arguments.

If a dummy argument is of type character, the associated actual argument must be of type character and the length of the dummy argument must be less than or equal to the length of the actual argument. If the length len of a dummy argument of type character is less than the length of an associated actual argument, the leftmost len characters of the actual argument are associated with the dummy argument.

If a dummy argument of type character is an array name, the restriction on length is for the entire array and not for each array element. The length of an array element in the dummy argument array may be different from the length of an array element in an associated actual argument array, array element, or array element substring, but the dummy argument array must not extend beyond the end of the associated actual argument array.

If an actual argument is a character substring, the length of the actual argument is the length of the substring. If an actual argument is the concatenation of two or more operands, its length is the sum of the lengths of the operands.

#### 15.9.3.2 Variables as Dummy Arguments.

A dummy argument that is a variable may be associated with an actual argument that is a variable, array element, substring, or expression.

If the actual argument is a variable name, array element name, or substring name, the associated dummy argument may be defined or redefined within the subprogram. If the actual argument is a constant, a symbolic name of a constant, a function reference, an expression involving operators, or an expression enclosed in parentheses, the associated dummy argument must not be redefined within the subprogram.

#### 15.9.3.3 Arrays as Dummy Arguments.

Within a program unit, the array declarator given for an array provides all array declarator information needed for the array in an execution of the program unit. The number and size of dimensions in an actual argument array declarator may be different from the number and size of the dimensions in an associated dummy argument array declarator.

A dummy argument that is an array may be associated with an actual argument that is an array, array element, or array element substring.

If the actual argument is a noncharacter array name, the size of the dummy argument array must not exceed the size of the actual argument array, and each actual argument array element becomes associated with the dummy argument array element that has the same subscript value as the actual argument array element. Note that association by array elements exists for character arrays if there is agreement in length between the actual argument and the dummy argument array elements; if the lengths do not agree, the dummy and actual argument array elements do not consist of the same characters, but an association still exists.

If the actual argument is a noncharacter array element name, the size of the dummy argument array must not exceed the size of the actual argument array plus one minus the subscript value of the array element. When an actual argument is a noncharacter array element name with a subscript value of as , the dummy argument array element with a subscript value of ds becomes associated with the actual argument array element that has a subscript value of as + ds - 1 (Table 1, 5.4.3).

If the actual argument is a character array name, character array element name, or character array element substring name and begins at character storage unit acu of an array, character storage unit dcu of an associated dummy argument array becomes associated with character storage unit acu + dcu - 1 of the actual argument array.

#### 15.9.3.4 Procedures as Dummy Arguments.

A dummy argument that is a dummy procedure may be associated only with an actual argument that is an intrinsic function, external function, subroutine, or another dummy procedure.

If a dummy argument is used as if it were an external function, the associated actual argument must be an intrinsic function, external function, or dummy procedure. A dummy argument that becomes associated with an intrinsic function never has any automatic typing property, even if the dummy argument name appears in Table 5 ( 15.10). Therefore, the type of the dummy argument must agree with the type of the result of all specific actual arguments that become associated with the dummy argument. If a dummy argument name is used as if it were an external function and that name also appears in Table 5, the intrinsic function corresponding to the dummy argument name is not available for referencing within the subprogram.

A dummy argument that is used as a procedure name in a function reference and is associated with an intrinsic function must have arguments that agree in order, number, and type with those specified in Table 5 for the intrinsic function.

If a dummy argument appears in a type-statement and an EXTERNAL statement, the actual argument must be the name of an intrinsic function, external function, or dummy procedure.

If the dummy argument is referenced as a subroutine, the actual argument must be the name of a subroutine or dummy procedure and must not appear in a type-statement or be referenced as a function.

Note that it may not be possible to determine in a given program unit whether a dummy procedure is associated with a function or a subroutine. If a procedure name appears only in a dummy argument list, an EXTERNAL statement, and an actual argument list, it is not possible to determine whether the symbolic name becomes associated with a function or subroutine by examination of the subprogram alone.

#### 15.9.3.5 Asterisks as Dummy Arguments.

A dummy argument that is an asterisk may appear only in the dummy argument list of a SUBROUTINE statement or an ENTRY statement in a subroutine subprogram.

A dummy argument that is an asterisk may be associated only with an actual argument that is an alternate return specifier in the CALL statement that identifies the current referencing name. If a dummy argument is an asterisk, the corresponding actual argument must be an alternate return specifier.

#### 15.9.3.6 Restrictions on Association of Entities.

If a subprogram reference causes a dummy argument in the referenced subprogram to become associated with another dummy argument in the referenced subprogram, neither dummy argument may become defined during execution of that subprogram. For example, if a subroutine is headed by
`SUBROUTINE XYZ (A,B)`
and is referenced by
`CALL XYZ (C,C)`
the[n the dummy arguments A and B each become associated with the same actual argument C and therefore with each other. Neither A nor B may become defined during this execution of subroutine XYZ or by any procedures referenced by XYZ.

If a subprogram reference causes a dummy argument to become associated with an entity in a common block in the referenced subprogram or in a subprogram referenced by the referenced subprogram, neither the dummy argument nor the entity in the common block may become defined within the subprogram or within a subprogram referenced by the referenced subprogram. For example, if a subroutine contains the statements:

1. SUBROUTINE XYZ (A)
2. COMMON C

and is referenced by a program unit that contains the statements:

1. COMMON B
2. CALL XYZ (B)

then the dummy argument A becomes associated with the actual argument B, which is associated with C, which is in a common block. Neither A nor C may become defined during execution of the subroutine XYZ or by any procedures referenced by XYZ.

### 15.9.4 Common Blocks.

A common block provides a means of communication between external procedures or between a main program and an external procedure. The variables and arrays in a common block may be defined and referenced in all subprograms that contain a declaration of that common block. Because association is by storage rather than by name, the names of the variables and arrays may be different in the different subprograms. A reference to a datum in a common block is proper if the datum is in a defined state of the same type as the type of the name used to reference the datum. However, an integer variable that has been assigned a statement label must not be referenced in any program unit other than the one in which it was assigned ( 10.3).

No difference in data type is permitted between the defined state and the type of the reference, except that either part of a complex datum may be referenced also as a real datum.

In a subprogram that has declared a named common block, the entities in the block remain defined after the execution of a RETURN or END statement if a common block of the same name has been declared in any program unit that is currently referencing the subprogram, either directly or indirectly. Otherwise, such entities become undefined at the execution of a RETURN or END statement, except for those that are specified by SAVE statements and those that were initially defined by DATA statements and have neither been redefined nor become undefined.

Execution of a RETURN or END statement does not cause entities in blank common or in any named common block that appears in the main program to become undefined.

Common blocks may be used also to reduce the total number of storage units required for an executable program by causing two or more subprograms to share some of the same storage units. This sharing of storage is permitted if the rules for defining and referencing data are not violated.

## 15.10 Table of Intrinsic Functions

Notes for Table 5:

1. For a of type integer, int(a)=a . For a of type real or double precision, there are two cases: if |a| < 1, int(a)=0; if |a| >= 1, int(a) is the integer whose magnitude is the largest integer that does not exceed the magnitude of a and whose sign is the same as the sign of a . For example,
`int(-3.7) = -3`
For a of type complex, int(a) is the value obtained by applying the above rule to the real part of a .

For a of type real, IFIX(a) is the same as INT(a) .

2. For a of type real, REAL(a) is a . For a of type integer or double precision, REAL(a) is as much precision of the significant part of a as a real datum can contain. For a of type complex, REAL(a) is the real part of a .

For a of type integer, FLOAT(a) is the same as REAL(a) .

3. For a of type double precision, DBLE(a) is a . For a of type integer or real, DBLE(a) is as much precision of the significant part of a as a double precision datum can contain. For a of type complex, DBLE(a) is as much precision of the significant part of the real part of a as a double precision datum can contain.
4. CMPLX may have one or two arguments. If there is one argument, it may be of type integer, real, double precision, or complex. If there are two arguments, they must both be of the same type and may be of type integer, real, or double precision.

For a of type complex, CMPLX(a) is a . For a of type integer, real, or double precision, CMPLX(a) is the complex value whose real part is REAL(a) and whose imaginary part is zero.

CMPLX(a ,a ) 1 2 is the complex value whose real part is REAL(a ) 1 and whose imaginary part is REAL(a ) 2 .

5. ICHAR provides a means of converting from a character to an integer, based on the position of the character in the processor collating sequence. The first character in the collating sequence corresponds to position 0 and the last to position n-1 , where n is the number of characters in the collating sequence.

The value of ICHAR(a) is an integer in the range: 0 <= ICHAR(a) <= n-1 , where a is an argument of type character of length one. The value of a must be a character capable of representation in the processor. The position of that character in the collating sequence is the value of ICHAR.

For any characters c 1 and c 2 capable of representation in the processor, (c .LE c ) 1 2 is true if and only if (ICHAR(c ) .LE. ICHAR(c )) 1 2 is true, and (c .EQ. c ) 1 2 is true if and only if (ICHAR(c ) .EQ. ICHAR(c )) 1 2 is true.

CHAR(i) returns the character in the ith position of the processor collating sequence. The value is of type character of length one. i must be an integer expression whose value must be in the range 0 <= i <= n-1 .

• ICHAR(CHAR(i)) = i for 0 <= i <=n-1.
• CHAR(ICHAR(c)) = c for any character c capable of representation in the processor.
6. A complex value is expressed as an ordered pair of reals, (ar,ai) , where ar is the real part and ai is the imaginary part.
7. All angles are expressed in radians.
8. The result of a function of type complex is the principal value.
9. All arguments in an intrinsic function reference must be of the same type.
10. INDEX(a ,a ) 1 2 returns an integer value indicating the starting position within the character string a 1 of a substring identical to string a 2 . If a 2 occurs more than once in a 1 , the starting position of the first occurrence is returned.

If a 2 does not occur in a 1 , the value zero is returned. Note that zero is returned if LEN(a ) < LEN(a ) 1 2 .

11. The value of the argument of the LEN function need not be defined at the time the function reference is executed.
12. LGE(a ,a ) 1 2 returns the value true if a =a 1 2 or if a 1 follows a 2 in the collating sequence described in American National Standard Code for Information Interchange, ANSI X3.4-1977 (ASCII), and otherwise returns the value false.

LGT(a ,a ) 1 2 returns the value true if a 1 follows a 2 in the collating sequence described in ANSI X3.4-1977 (ASCII), and otherwise returns the value false.

LLE(a ,a ) 1 2 returns the value true if a =a 1 2 or if a 1 precedes a 2 in the collating sequence described in ANSI X3.4-1977 (ASCII), and otherwise returns the value false.

LLT(a ,a ) 1 2 returns the value true if a 1 precedes a 2 in the collating sequence described in ANSI X3.4-1977 (ASCII), and otherwise returns the value false.

If the operands for LGE, LGT, LLE, and LLT are of unequal length, the shorter operand is considered as if it were extended on the right with blanks to the length of the longer operand.

If either of the character entities being compared contains a character that is not in the ASCII character set, the result is processor-dependent.

### 15.10.1 Restrictions on Range of Arguments and Results.

Restrictions on the range of arguments and results for intrinsic functions when referenced by their specific names are as follows:
1. Remaindering: The result for MOD, AMOD, and DMOD is undefined when the value of the second argument is zero.
2. Transfer of Sign: If the value of the first argument of ISIGN, SIGN, or DSIGN is zero, the result is zero, which is neither positive or negative ( 4.1.3).
3. Square Root: The value of the argument of SQRT and DSQRT must be greater than or equal to zero. The result of CSQRT is the principal value with the real part greater than or equal to zero. When the real part of the result is zero, the imaginary part is greater than or equal to zero.
4. Logarithms: The value of the argument of ALOG, DLOG, ALOG10, and DLOG10 must be greater than zero. The value of the argument of CLOG must not be (0.,0.). The range of the imaginary part of the result of CLOG is: -pi < imaginary part <= pi . The imaginary part of the result is pi only when the real part of the argument is less than zero and the imaginary part of the argument is zero.
5. Sine, Cosine, and Tangent: The absolute value of the argument of SIN, DSIN, COS, DCOS, TAN, and DTAN is not restricted to be less than 2pi .
6. Arcsine: The absolute value of the argument of ASIN and DASIN must be less than or equal to one. The range of the result is: -pi/2 <= result <= pi/2 .
7. Arccosine: The absolute value of the argument of ACOS and DACOS must be less than or equal to one. The range of the result is: 0 <= result <=pi .
8. Arctangent: The range of the result for ATAN and DATAN is: -pi/2 <= result <= pi/2 . If the value of the first argument of ATAN2 or DATAN2 is positive, the result is positive. If the value of the first argument is zero, the result is zero if the second argument is positive and pi if the second argument is negative. If the value of the first argument is negative, the result is negative. If the value of the second argument is zero, the absolute value of the result is pi/2 . The arguments must not both have the value zero. The range of the result for ATAN2 and DATAN2 is: -pi < result <= pi .

The above restrictions on arguments and results also apply to the intrinsic functions when referenced by their generic names.

Table_5

Intrinsic Functions
```_________________________________________________________________________________________________
|                  |                   |           |         |          |                       |
|                  |                   |  Number of|  Generic|  Specific|         Type of       |
|Intrinsic_Function|__Definition_______|__Arguments|___Name__|__Name____|__Argument_|__Function_|
|                  |                   |           |         |          |           |           |
|Type Conversion   |  Conversion       |      1    |  INT    |  -       |  Integer  |  Integer  |
|                  |  to Integer       |           |         |  INT     |  Real     |  Integer  |
|                  |  int(a)           |           |         |  IFIX    |  Real     |  Integer  |
|                  |  See Note 1       |           |         |  IDINT   |  Double   |  Integer  |
|                  |                   |           |         |  -       |  Complex  |  Integer  |
|                  | __________________|___________|_________|__________|___________|___________|
|                  |                   |           |         |          |           |           |
|                  |  Conversion       |      1    |  REAL   |  REAL    |  Integer  |  Real     |
|                  |  to Real          |           |         |  FLOAT   |  Integer  |  Real     |
|                  |  See Note 2       |           |         |  -       |  Real     |  Real     |
|                  |                   |           |         |  SNGL    |  Double   |  Real     |
|                  | __________________|___________|_________|__-_______|__Complex__|__Real_____|
|                  |                   |           |         |          |           |           |
|                  |  Conversion       |      1    |  DBLE   |  -       |  Integer  |  Double   |
|                  |  to Double        |           |         |  -       |  Real     |  Double   |
|                  |  See Note 3       |           |         |  -       |  Double   |  Double   |
|                  |                   |           |         |  -       |  Complex  |  Double   |
|                  | __________________|___________|_________|__________|___________|___________|
|                  |                   |           |         |          |           |           |
|                  |  Conversion       |   1 or 2  |  CMPLX  |  -       |  Integer  |  Complex  |
|                  |  to Complex       |           |         |  -       |  Real     |  Complex  |
|                  |  See Note 4       |           |         |  -       |  Double   |  Complex  |
|                  | __________________|___________|_________|__-_______|__Complex__|__Complex__|
|                  |                   |           |         |          |           |           |
|                  |  Conversion       |      1    |         |  ICHAR   |  Character|  Integer  |
|                  |  to Integer       |           |         |          |           |           |
|                  |  See Note 5       |           |         |          |           |           |
|                  | __________________|___________|_________|__________|___________|___________|
|                  |                   |           |         |          |           |           |
|                  |  Conversion       |      1    |         |  CHAR    |  Integer  |  Character|
|                  |  to Character     |           |         |          |           |           |
|__________________|__See_Note_5_______|___________|_________|__________|___________|___________|
|                  |                   |           |         |          |           |           |
|Truncation        |  int(a)           |      1    |  AINT   |  AINT    |  Real     |  Real     |
|                  |  See Note 1       |           |         |  DINT    |  Double   |  Double   |
|__________________|___________________|___________|_________|__________|___________|___________|
|                  |                   |           |         |          |           |           |
|Nearest Whole     |  int(a+.5) if a>=0|      1    |  ANINT  |  ANINT   |  Real     |  Real     |
|__Number__________|__int(a-.5)_if_a<__|___________|_________|__DNINT___|__Double___|__Double___|
|                  |                   |           |         |          |           |           |
|Nearest Integer   |  int(a+.5) if a>=0|      1    |  NINT   |  NINT    |  Real     |  Integer  |
|                  |  int(a-.5) if a<0 |           |         |  IDNINT  |  Double   |  Integer  |
|__________________|___________________|___________|_________|__________|___________|___________|
|                  |                   |           |         |          |           |           |
|Absolute Value    |  |a|              |      1    |  ABS    |  IABS    |  Integer  |  Integer  |
|                  |  See Note 6       |           |         |  ABS     |  Real     |  Real     |
|                  |     2     1/2     |           |         |  DABS    |  Double   |  Double   |
|__________________|__(ar_+ai_)________|___________|_________|__CABS____|__Complex__|__Real_____|
```

Table 5 (continued)
Intrinsic Functions

```________________________________________________________________________________________________
|                   |                  |           |         |          |                      |
|                   |                  |  Number of|  Generic|  Specific|        Type of       |
|Intrinsic_Function_|__Definition______|__Arguments|___Name__|__Name____|__Argument_|__Function|
|                   |                  |           |         |          |           |          |
|Remaindering       |  a -int(a /a )*a |      2    |  MOD    |  MOD     |  Integer  |  Integer |
|                   |   1      1  2   2|           |         |  AMOD    |  Real     |  Real    |
|                   |  See Note 1      |           |         |  DMOD    |  Double   |  Double  |
|___________________|__________________|___________|_________|__________|___________|__________|
|                   |                  |           |         |          |           |          |
|Transfer of Sign   |  |a1|  if a2 >= 0|      2    |  SIGN   |  ISIGN   |  Integer  |  Integer |
|                   |  -|a1| if a2 < 0 |           |         |  SIGN    |  Real     |  Real    |
|___________________|__________________|___________|_________|__DSIGN___|__Double___|__Double__|
|                   |                  |           |         |          |           |          |
|Positive Difference|  a -a  if a >a   |      2    |  DIM    |  IDIM    |  Integer  |  Integer |
|                   |   10 2 if a1<=2  |           |         |  DIM     |  Real     |  Real    |
|                   |            1   2 |           |         |  DDIM    |  Double   |  Double  |
|___________________|__________________|___________|_________|__________|___________|__________|
|                   |                  |           |         |          |           |          |
|Double Precision   |  a1*a2           |      2    |         |  DPROD   |  Real     |  Double  |
|__Product__________|__________________|___________|_________|__________|___________|__________|
|                   |                  |           |         |          |           |          |
|Choosing Largest   |  max(a ,a ,...)  |     >=2   |  Max    |  MAX0    |  Integer  |  Integer |
|  Value            |       1  2       |           |         |  AMAX1   |  Real     |  Real    |
|                   |                  |           |         |  DMAX1   |  Double   |  Double  |
|                   |                  |           | ________|__________|___________|__________|
|                   |                  |           |         |          |           |          |
|                   |                  |           |         |  AMAX0   |  Integer  |  Real    |
|___________________|__________________|___________|_________|__MAX1____|__Real_____|__Integer_|
|                   |                  |           |         |          |           |          |
|Choosing Smallest  |  min(a ,a ,...)  |     >=2   |  MIN    |  MIN0    |  Integer  |  Integer |
|  Value            |       1  2       |           |         |  AMIN1   |  Real     |  Real    |
|                   |                  |           |         |  DMIN1   |  Double   |  Double  |
|                   |                  |           | ________|__________|___________|__________|
|                   |                  |           |         |          |           |          |
|                   |                  |           |         |  AMIN0   |  Integer  |  Real    |
|___________________|__________________|___________|_________|__MIN1____|__Real_____|__Integer_|
|                   |                  |           |         |          |           |          |
|Length             |  Length of       |      1    |         |  LEN     |  Character|  Integer |
|                   |  Character Entity|           |         |          |           |          |
|___________________|__________________|___________|_________|__________|___________|__________|
|                   |                  |           |         |          |           |          |
|Index of           |  Location of     |      2    |         |  INDEX   |  Character|  Integer |
|a Substring        |  Substring a2    |           |         |          |           |          |
|                   |  in String a1    |           |         |          |           |          |
|___________________|__See_Note_1______|___________|_________|__________|___________|__________|
|                   |                  |           |         |          |           |          |
|Imaginary Part of  |  ai              |      1    |         |  AIMAG   |  Complex  |  Real    |
| Complex Argument  |  See Note 6      |           |         |          |           |          |
|___________________|__________________|___________|_________|__________|___________|__________|
|                   |                  |           |         |          |           |          |
|Conjugate of a     |  (ar,-ai)        |      1    |         |  CONJG   |  Complex  |  Complex |
|_Complex_Argument__|__See_Note_6______|___________|_________|__________|___________|__________|
|                   |                  |           |         |          |           |          |
|Square Root        |  (a)1/2          |      1    |  SQRT   |  SQRT    |  Real     |  Real    |
|                   |                  |           |         |  DSQRT   |  Double   |  Double  |
|                   |                  |           |         |  CSQRT   |  Complex  |  Complex |
|___________________|__________________|___________|_________|__________|___________|__________|
```

Table 5 (continued)
Intrinsic Functions

```___________________________________________________________________________________________
|                  |               |           |         |          |                     |
|                  |               |  Number of|  Generic|  Specific|        Type of      |
|Intrinsic_Function|__Definition___|__Arguments|___Name__|__Name____|__Argument|__Function|
|                  |               |           |         |          |          |          |
|Exponential       |  e**a         |      1    |  EXP    |  EXP     |  Real    |  Real    |
|                  |               |           |         |  DEXP    |  Double  |  Double  |
|                  |               |           |         |  CEXP    |  Complex |  Complex |
|__________________|_______________|___________|_________|__________|__________|__________|
|                  |               |           |         |          |          |          |
|Natural Logarithm |  log(a)       |      1    |  LOG    |  ALOG    |  Real    |  Real    |
|                  |               |           |         |  DLOG    |  Double  |  Double  |
|__________________|_______________|___________|_________|__CLOG____|__Complex_|__Complex_|
|                  |               |           |         |          |          |          |
|Common Logarithm  |  log10(a)     |      1    |  LOG10  |  ALOG10  |  Real    |  Real    |
|                  |               |           |         |  DLOG10  |  Double  |  Double  |
|__________________|_______________|___________|_________|__________|__________|__________|
|                  |               |           |         |          |          |          |
|Sine              |  sin(a)       |      1    |  SIN    |  SIN     |  Real    |  Real    |
|                  |               |           |         |  DSIN    |  Double  |  Double  |
|__________________|_______________|___________|_________|__CSIN____|__Complex_|__Complex_|
|                  |               |           |         |          |          |          |
|Cosine            |  cos(a)       |      1    |  COS    |  COS     |  Real    |  Real    |
|                  |               |           |         |  DCOS    |  Double  |  Double  |
|                  |               |           |         |  CCOS    |  Complex |  Complex |
|__________________|_______________|___________|_________|__________|__________|__________|
|                  |               |           |         |          |          |          |
|Tangent           |  tan(a)       |      1    |  TAN    |  TAN     |  Real    |  Real    |
|__________________|_______________|___________|_________|__DTAN____|__Double__|__Double__|
|                  |               |           |         |          |          |          |
|Arcsine           |  arcsin(a)    |      1    |  ASIN   |  ASIN    |  Real    |  Real    |
|                  |               |           |         |  DASIN   |  Double  |  Double  |
|__________________|_______________|___________|_________|__________|__________|__________|
|                  |               |           |         |          |          |          |
|Arccosine         |  arccos(a)    |      1    |  ACOS   |  ACOS    |  Real    |  Real    |
|__________________|_______________|___________|_________|__DACOS___|__Double__|__Double__|
|                  |               |           |         |          |          |          |
|Arctangent        |  arctan(a)    |      1    |  ATAN   |  ATAN    |  Real    |  Real    |
|                  |               |           |         |  DATAN   |  Double  |  Double  |
|                  | ______________|___________|_________|__________|__________|__________|
|                  |               |           |         |          |          |          |
|                  |  arctan(a1/a2)|      2    |  ATAN2  |  ATAN2   |  Real    |  Real    |
|__________________|_______________|___________|_________|__DATAN2__|__Double__|__Double__|
|                  |               |           |         |          |          |          |
|Hyperbolic Sine   |  sinh(a)      |      1    |  SINH   |  SINH    |  Real    |  Real    |
|                  |               |           |         |  DSINH   |  Double  |  Double  |
|__________________|_______________|___________|_________|__________|__________|__________|
|                  |               |           |         |          |          |          |
|Hyperbolic Cosine |  cosh(a)      |      1    |  COSH   |  COSH    |  Real    |  Real    |
|__________________|_______________|___________|_________|__DCOSH___|__Double__|__Double__|
|                  |               |           |         |          |          |          |
|Hyperbolic Tangent|  tanh(a)      |      1    |  TANH   |  TANH    |  Real    |  Real    |
|                  |               |           |         |  DTANH   |  Double  |  Double  |
|__________________|_______________|___________|_________|__________|__________|__________|
```

Table 5 (continued)
Intrinsic Functions

```__________________________________________________________________________________________
|                  |             |           |         |          |                      |
|                  |             |  Number of|  Generic|  Specific|        Type of       |
|Intrinsic_Function|__Definition_|__Arguments|___Name__|__Name____|__Argument_|__Function|
|                  |             |           |         |          |           |          |
|Lexically Greater |  a  >= a    |      2    |         |  LGE     |  Character|  Logical |
|  Than or Equal   |   1     2   |           |         |          |           |          |
|                  |  See Note 12|           |         |          |           |          |
|__________________|_____________|___________|_________|__________|___________|__________|
|                  |             |           |         |          |           |          |
|Lexically Greater |  a1 > a2    |      2    |         |  LGT     |  Character|  Logical |
|__Than____________|__See_Note_12|___________|_________|__________|___________|__________|
|                  |             |           |         |          |           |          |
|Lexically Less    |  a  <= a    |      2    |         |  LLE     |  Character|  Logical |
|  Than or Equal   |   1     2   |           |         |          |           |          |
|                  |  See Note 12|           |         |          |           |          |
|__________________|_____________|___________|_________|__________|___________|__________|
|                  |             |           |         |          |           |          |
|Lexically Less    |  a1 < a2    |      2    |         |  LLT     |  Character|  Logical |
|__Than____________|__See_Note_12|___________|_________|__________|___________|__________|
```

[Contents] [Previous] [Next] [Home]

NDP77
http://www.ndp77.net
webmaster MFA (main)
webmaster@ndp77.net