XL Fortran for AIX 8.1

Language Reference

Extended Intrinsic and Defined Operations

A defined operation is either a defined unary operation or a defined binary operation. It is defined by a function and a generic interface block (see Interface Blocks). A defined operation is not an intrinsic operation, although an intrinsic operator can be extended in a defined operation. For example, to add two objects of derived type, you can extend the meaning of the intrinsic binary operator for addition (+). If an extended intrinsic operator has typeless operands, the operation is evaluated intrinsically.

The operand of a unary intrinsic operation that is extended must not have a type that is required by the intrinsic operator. Either or both of the operands of a binary intrinsic operator that is extended must not have the types or ranks that are required by the intrinsic operator.

The defined operator of a defined operation must be defined in a generic interface.

A defined operator is an extended intrinsic operator or has the form:

      V              |
        |     (1)  |
        +- _ ------+
        |     (2)  |
        '- $ ------'


  1. XL Fortran defined operator

  2. XL Fortran defined operator

A defined operator must not contain more than 31 characters and must not be the same as any intrinsic operator or logical literal constant.

See Generic Interface Blocks for details on defining and extending operators in an interface block.

[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]