Intel® Fortran Compiler 17.0 Developer Guide and Reference
Mixed-language programming is the process of building programs in which the source code is written in two or more languages. It allows you to:
Call existing code that is written in another language
Use procedures that may be difficult to implement in a particular language
In mixed-language programming, a routine written in one language calls a function, procedure, or subroutine written in another language. For example, a Fortran program may need to call an existing shared library or system procedure written in another language.
Although mixed language programming is possible between Intel® Fortran and other languages, the primary focus of this section is programming using Intel® Fortran and C. Mixed language programming between these languages is relatively straightforward for these reasons:
Fortran implements functions, subroutines, and procedures in approximately the same way as C.
Fortran provides many standard features to improve interoperability with C. An entity is considered to be interoperable if equivalent declarations are possible in both languages. Interoperability is provided for variables, derived types, and procedures. For more information, see Standard Fortran and C Interoperability.
The following applies to Windows* OS: The Intel® Fortran samples area, created during product installation, contains a number of sample mixed language programs that you can compile and run. For more information, see Using the Intel® Visual Fortran Samples.