インテル® Fortran コンパイラー 19.0 デベロッパー・ガイドおよびリファレンス

Generic Bindings

User-defined I/O procedures can be type-bound procedures that use a defined-io-generic-spec (see Defined IO Procedures).

Consider the following:

TYPE LIST
TYPE(NODE), POINTER :: FIRST
CONTAINS
PROCEDURE :: FMTREAD => LIST_FMTREAD
PROCEDURE :: FMTWRITE => LIST_FMTWRITE
GENERIC,PUBLIC :: READ(FORMATTED) => FMTREAD 
GENERIC,PUBLIC :: WRITE(FORMATTED) => FMTWRITE
END TYPE LIST

In the above example, LIST_FMTREAD and LIST_FMTWRITE are the type-bound defined I/O procedures. If an object of type LIST is an effective item in a formatted READ statement, LIST_FMTREAD will be called to perform the read operation.

See Also