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 (see Interface blocks and Type-bound procedures (Fortran 2003)). 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.
In Fortran 90 and Fortran 95, a defined operator must not contain more than 31 letters, and must not be the same as any intrinsic operator or logical literal constant. In Fortran 2003 the letter limit for a defined operator is 63.
See Generic interface blocks for details on defining and extending operators in an interface block. See Type-bound procedures (Fortran 2003) for details on defining and extending operators that are bound to a derived type.



