Intel® Fortran Compiler 18.0 Developer Guide and Reference

MODULE PROCEDURE

Statement: Identifies module procedures in an interface block that specifies a generic name.

Example

!A program that changes non-default integers and reals
! into default integers and reals
   PROGRAM CHANGE_KIND
   USE Module1
   integer(2) in
   integer indef
   indef = DEFAULT(in)
   END PROGRAM

! procedures sub1 and sub2 defined as follows:
   MODULE Module1
    INTERFACE DEFAULT
      MODULE PROCEDURE Sub1, Sub2
    END INTERFACE
    CONTAINS
      FUNCTION Sub1(y)
        REAL(8) y
        sub1 = REAL(y)
      END FUNCTION
      FUNCTION Sub2(z)
        INTEGER Sub2
        INTEGER(2) z
        sub2 = INT(z)
      END FUNCTION
    END MODULE

See Also