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
Gain advantages in processing speeds
Mixed-language programming is possible between Intel® Fortran and Intel® C++.
To properly create mixed-language programs, rules must be established for naming variables and procedures, for stack use, and for argument passing among routines written in different languages. These rules, as a whole, are the calling convention.
A calling convention includes:
Stack consideration: Does a routine receive a varying or fixed number of arguments?
Is lowercase or uppercase significant or not significant?
Are external names altered?
Argument passing protocol
Are arguments passed by value or by reference?
What are the equivalent data types and data structures among languages?
This section provides information on the calling conventions available when writing routines written in Fortran, C, C++, and assembly language. See these topics:
Calling Subprograms from the Main Program
Summary of Mixed-Language Issues
Adjusting Calling Conventions in Mixed-Language Programming Overview
Adjusting Naming Conventions in Mixed-Language Programming Overview
Protoyping a Procedure in Fortran
Exchanging and Accessing Data in Mixed-Language Programming Overview
Handling Data Types in Mixed-Language Programming Overview
Intel Fortran/C Mixed-Language Programs Overview