Fortran 90模拟C++函数重载  

Fortran 90 emulating C++ function overloading

在线阅读下载全文

作  者:靳开冠[1] 周振红[1] 

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

出  处:《硅谷》2011年第23期193-194,共2页

摘  要:函数重载是C++语言多态性的重要体现,也是面向对象程序设计的常用方法,Fortran 90不支持面向对象程序设计,但已经具有一些现代语言特征,为模拟面向对象程序设计提供可能,在分析C++函数重载机制的基础上,通过对Fortran 90相关语言元素、工具的探索,提出利用Fortran 90新增加的接口块这一利器模拟C++函数重载的方法,实例运行结果表明,该方法现实可行,从而扩展Fortran 90的应用范围,并为模拟面向对象程序设计提供思路。Function overloading is an important embodiment of polymorphism in C++, and a kind of common use for object-oriented programming. Fortran 90 does not support object-oriented programming, but possesses some features of modern computer languages which make it possible to emulate object-oriented programming. With the exploration of some related language elements and tools of Fortran 90, it is put forward that the function overloading mechanism can be emulated indirectly with the new powerful tool of interfaces on the basis of analyzing C++ function overloading. The examples have proved that this method is workable so as to extend the applicable areas of Fortran 90, and provide some ideas to emulate object-oriented programming.

关 键 词:FORTRAN 90 接口块 C++ 面向对象程序设计 函数重载 

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

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

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