# 9.1 Argument Keywords in Intrinsic Procedures

For all intrinsic procedures, the arguments shown are the names you must use as keywords when using the keyword form for actual arguments. For example, a reference to function CMPLX (X, Y, KIND) can be written as follows:

Using positional arguments: | CMPLX (F, G, L)
Using argument keywords: | CMPLX (KIND=L, Y=G, X=F) 1
1 Note that argument keywords can be written in any order.

Some argument keywords are optional (denoted by square brackets). The following describes some of the most commonly used optional arguments:

BACK | Specifies that a string scan is to be in reverse order (right to left).
DIM | Specifies a selected dimension of an array argument.
KIND | Specifies the kind type parameter of the function result.
MASK | Specifies that a mask can be applied to the elements of the argument array to exclude the elements that are not to be involved in an operation.

Examples

The syntax for the DATE_AND_TIME intrinsic subroutine shows four optional positional arguments: DATE, TIME, ZONE, and VALUES (see Section 9.3.36).

The following shows some valid ways to specify these arguments:

      ! Keyword example
      CALL DATE_AND_TIME (ZONE=Z)

      ! The following two positional examples are equivalent:
      CALL DATE_AND_TIME (DATE, TIME, ZONE)
      CALL DATE_AND_TIME (, , ZONE)

For More Information:

- On argument keywords in subroutine references, see Section 7.2.
- On argument keywords in function references, see Section 8.5.2.2.
- On argument association, see Section 8.8.

Previous Page Next Page Table of Contents