END INTERFACE

Purpose

The END INTERFACE statement terminates a procedure interface block.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-END INTERFACE--+--------------+-----------------------------><
                  '-generic_spec-'   

generic_spec
Read syntax diagramSkip visual syntax diagram
>>-+-generic_name---------------------+------------------------><
   +-OPERATOR--(--defined_operator--)-+   
   +-ASSIGNMENT--(-- = --)------------+   
   |                   (1)            |   
   '-dtio_generic_spec----------------'   

Notes:
  1. Fortran 2003
defined_operator
is a defined unary operator, defined binary operator, or extended intrinsic operator
dtio_generic_spec
Read syntax diagramSkip visual syntax diagram
>>-+-READ--(--FORMATTED--)----+--------------------------------><
   +-READ--(--UNFORMATTED--)--+   
   +-WRITE--(--FORMATTED--)---+   
   '-WRITE--(--UNFORMATTED--)-'   

Rules

Each INTERFACE statement must have a corresponding END INTERFACE statement.

An END INTERFACE statement without a generic_spec can match any INTERFACE statement, with or without a generic_spec.

If the generic_spec in an END INTERFACE statement is a generic_name, the generic_spec of the corresponding INTERFACE statement must be the same generic_name.

If the generic_spec in an END INTERFACE statement is an OPERATOR(defined_operator), the generic_spec of the corresponding INTERFACE statement must be the same OPERATOR(defined_operator).

If the generic_spec in an END INTERFACE statement is an ASSIGNMENT(=), the generic_spec for the corresponding INTERFACE statement must be the same ASSIGNMENT(=).

If the generic_spec in an END INTERFACE statement is a dtio_generic_spec, the generic_spec for the corresponding INTERFACE statement must be the same dtio_generic_spec.

Examples

INTERFACE OPERATOR (.DETERMINANT.)
  FUNCTION DETERMINANT (X)
    INTENT(IN) X
    REAL X(50,50), DETERMINANT
  END FUNCTION
END INTERFACE
INTERFACE OPERATOR(.INVERSE.)
  FUNCTION INVERSE(Y)
    INTENT(IN) Y
    REAL Y(50,50), INVERSE
  END FUNCTION
END INTERFACE OPERATOR(.INVERSE.)

Related information



Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us