Intel® Fortran Compiler 18.0 Developer Guide and Reference

IMPORT

Statement: Makes host entities accessible in the interface body of an interface block. It takes the following form:

IMPORT [[::] import-name-list]

import-name-list

(Input) Is the name of one or more entities in the host scoping unit.

An IMPORT statement can appear only in an interface body. Each of the named entities must be explicitly declared before the interface body containing the IMPORT statement.

If import-name-list is not specified, all of the accessible named entities in the host scoping unit are imported.

The default is that all accessible symbols are imported. This statement can optionally name only those symbols you choose.

The names of imported entities must not appear in any context that causes the host entity to be inaccessible.

Example

The following example shows how the IMPORT statement can be applied.

module mymod
type mytype
  integer comp
end type mytype
interface
  subroutine sub (arg)
    import
    type(mytype) :: arg
  end subroutine sub
end interface
end module mymod