[1]Ren Hui,Zhou Zhenhong.Fortran shares common external data with C/C++[J].Journal of Zhengzhou University (Engineering Science),2007,28(04):63-65.[doi:10.3969/j.issn.1671-6833.2007.04.016]
Copy
Journal of Zhengzhou University (Engineering Science)[ISSN
1671-6833/CN
41-1339/T] Volume:
28
Number of periods:
2007年04期
Page number:
63-65
Column:
Public date:
1900-01-01
- Title:
-
Fortran shares common external data with C/C++
- Author(s):
-
Ren Hui; Zhou Zhenhong
-
-
- Keywords:
-
numerical calculation; hybrid programming; public external data; common areas; Structure
- CLC:
-
-
- DOI:
-
10.3969/j.issn.1671-6833.2007.04.016
- Abstract:
-
In Fortran’s hybrid programming with C/C++, data is mainly passed through routine parameters, which complicates the design of the called routine interface, and sometimes cannot directly utilize existing algorithm routines. An alternative way to pass data is proposed, that is, to share common external data between the two languages, including global variables and common areas/structs. The example results show that it is entirely feasible for Fortran to share common external data with C/C++ with appropriate measures, thus providing a new way to transfer data between the two languages.