Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 9/08/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

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: 1

CMPLX(KIND=L, Y=G, X=F)

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. The following shows some valid ways to specify these arguments:

  ! Keyword example
  CALL DATE_AND_TIME (ZONE=Z)

  ! Positional example
  CALL DATE_AND_TIME (DATE, TIME, ZONE)

See Also