Fortran与C/C++共享模块中的数据和例程  被引量:3

Fortran and C/C++ Sharing Data and Routines in Modules

在线阅读下载全文

作  者:毕苏萍[1] 周振红[2] 

机构地区:[1]郑州大学土木工程学院,河南郑州450001 [2]郑州大学环境与水利学院,河南郑州450001

出  处:《郑州大学学报(工学版)》2008年第1期99-101,109,共4页Journal of Zhengzhou University(Engineering Science)

基  金:河南省科技攻关项目(0496050905)

摘  要:多语言的混合编程主要是一种语言编写的程序对另一种语言编写的例程实施调用,所用到的数据主要通过例程参数来传递,当中很少体现出面向对象的程序设计思想.现提出利用Fortran 90新引进的模块,实现Fortran与C/C++面向对象的混合编程新模式.示例结果表明,C/C++既可直接访问For-tran模块中的数据和例程;其自身的数据和函数也可封装到模块中,供引用模块的Fortran程序单元访问.In mixed -language programming, routines programmed with one language are called with the other, and the data passed through calling argument lists, so no object- oriented programming is embodied in this process. In this paper, based on the module recommended by Fortran 90, a new way of object - oriented mixed- language programming with the two languages is presented. It has been proved from the experiment that not only C/C ++ is able to directly access the data and routines in the module, but also C/C ++ data and routines to be encapsulated into the module in order to be accessed by the Fortran unit using the module.

关 键 词:数值计算 混合编程 调用约定 面向对象 模块 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象