INTERFACE ASSIGNMENT statement
Standard: F77 F90 F95 F2003
  Example Program
<Syntax>
INTERFACE ASSIGNMENT(=)
<Semantics>
The INTERFACE ASSIGNMENT statement is an INTERFACE statement that begins a generic interface block. This interface block declares (additional) specific procedures for the assignment statement.

A procedure that implements assignment shall be a subroutine with exactly two arguments; the first argument shall have INTENT(OUT) or INTENT(INOUT), and the second argument shall have INTENT(IN).

When an assignment statement
      variable = expression
has a left-hand-side (variable) that matches the first argument of a specific procedure S, and a right-hand-side (expression) that matches the second argument of S, the procedure is called as if the statement had been written
      CALL S ( variable , ( expression ) )
Note the extra parentheses around the expression: this forces a copy to be made, to avoid any problem if variable and expression happen to overlap.

Note: An assignment procedure cannot replace intrinsic assignment, except for derived-type assignment. This means that, e.g., "X = 3" where X is Real, is always the intrinsic assignment.
<Related>
END INTERFACE statement, INTERFACE statement, INTERFACE OPERATOR statement, MODULE PROCEDURE statement