[1]毕苏萍,周振红..Fortran与C/C + +共享模块中的数据和例程[J].郑州大学学报(工学版),2008,29(01):99-101,109.
 Pi Suping,Zhou Zhenhong.Fortran shares data and routines in modules with C/C++[J].Journal of Zhengzhou University (Engineering Science),2008,29(01):99-101,109.
点击复制

Fortran与C/C + +共享模块中的数据和例程()
分享到:

《郑州大学学报(工学版)》[ISSN:1671-6833/CN:41-1339/T]

卷:
29卷
期数:
2008年01期
页码:
99-101,109
栏目:
出版日期:
1900-01-01

文章信息/Info

Title:
Fortran shares data and routines in modules with C/C++
作者:
毕苏萍周振红.
郑州大学,土木工程学院,河南,郑州,450001, 郑州大学,环境与水利学院,河南,郑州,450001
Author(s):
Pi Suping; Zhou Zhenhong
关键词:
数值计算 混合编程 调用约定 面向对象 模块
Keywords:
文献标志码:
A
摘要:
多语言的混合编程主要是一种语言编写的程序对另一种语言编写的例程实施调用,所用到的数据主要通过例程参数来传递,当中很少体现出面向对象的程序设计思想.现提出利用Fortran 90新引进的模块,实现Fortran与C/C + +面向对象的混合编程新模式.示例结果表明,C/C+ +既可直接访问Fortran模块中的数据和例程;其自身的数据和函数也可封装到模块中,供引用模块的Fortran程序单元访问.
Abstract:
Multi-language hybrid programming is mainly a program written in one language to call a routine written in another language, and the data used is mainly passed through routine parameters, which rarely reflects the object-oriented programming idea. It is proposed to use the newly introduced modules of Fortran 90 to realize a new hybrid programming model of Fortran and C/C++ object-oriented. The example results show that C/C++ has direct access to data and routines in the Fortran module; Its own data and functions can also be encapsulated in a module for access by Fortran program units referencing the module.

相似文献/References:

[1]任慧,周振红..Visual Fortran调用Win32 API函数[J].郑州大学学报(工学版),2008,29(04):61.[doi:10.3969/j.issn.1671-6833.2008.04.015]
 Ren Hui,Zhou Zhenhong.Visual Fortran calls Win32 API functions[J].Journal of Zhengzhou University (Engineering Science),2008,29(01):61.[doi:10.3969/j.issn.1671-6833.2008.04.015]
[2]周振红,宋宇伟,郭恒亮,等.Visual Fortran基于Win32 DLL的混合编程技术[J].郑州大学学报(工学版),2003,24(03):10.[doi:10.3969/j.issn.1671-6833.2003.03.003]
 ZHOU Zhenhong,SONG Yuwei,GUO Hengliang,et al.Visual Fortran is based on Win32 DLL’s hybrid programming technology[J].Journal of Zhengzhou University (Engineering Science),2003,24(01):10.[doi:10.3969/j.issn.1671-6833.2003.03.003]
[3]高双聚,杨玲霞.明渠非恒定流数值计算的边界处理新方法[J].郑州大学学报(工学版),1994,15(02):49.
 Gao Shuangju,Yang Lingxia.New method of boundary processing of uninvited value calculation of Ming canal[J].Journal of Zhengzhou University (Engineering Science),1994,15(01):49.
[4]任慧,周振红..Fortran与C/C + +共享公用外部数据[J].郑州大学学报(工学版),2007,28(04):63.[doi:10.3969/j.issn.1671-6833.2007.04.016]
 Ren Hui,Zhou Zhenhong.Fortran shares common external data with C/C++[J].Journal of Zhengzhou University (Engineering Science),2007,28(01):63.[doi:10.3969/j.issn.1671-6833.2007.04.016]

更新日期/Last Update: 1900-01-01