简介概要

混合编程与FORTRAN计算程序图形界面的实现

来源期刊:中南大学学报(自然科学版)2000年第6期

论文作者:朱从旭

文章页码:561 - 564

关键词:FORTRAN语言;外壳程序;动态链接库

Key words:FORTRAN Language; shell program; dynamic-link library

摘    要:针对FORTRAN语言计算效率高而 图形功能弱 ,VisualBasic(VB)计算效率低而图形功能强的特点 ,采用VB和FORTRAN 2种语言混合编程 ,充分利用各自的优点 ,实现FORTRAN计算程序资源的再利用 .此外 ,探讨了 2种实现FORTRAN计算程序可视化的方法 :一是通过磁盘文件在VB程序和FORTRAN程序间交换数据 ,并借助WindowsAPI(应用程序编程接口 )函数实现FORTRAN外壳程序在VB中同步运行 ,使FORTRAN外壳程序的计算结果在VB图形界面上显示 ;二是将FORTRAN程序转化为动态链接库函数 ,通过函数参数传递使VB程序和FORTRAN动态链接库函数之间交换数据 ,将FORTRAN的计算结果在VB窗体上显示并进行作图处理 ,从而实现了FORTRAN计算程序的图形界面及计算结果的可视化 .

Abstract: In the light of the characteristics that Calculating efficiency of FORTRAN language is high but its graphic f, unction of it is weak and the contrary characteristics of Visual Basic (VB) is low but its graphic function of it is powerful, the author programmed with mixed languages of VB and FORTRAN, so that their advantage can be utilized adeqately, and the purpose of reusing resources of FORTRAN calculation program was realized. Two methods of realizing graph interface of FORTRAN calculation programs were explored. One of them is exchanging data between VB program and FORTRAN program by disk files, drawing support from Windows API functions to realize FORTRAN shell program run in VB in synchronism, and showing calculating results of FORTRAN shell program on VB form. The other method is to change FORTRAN program into Dynamic-Link Library (DLL) functions, exchange data between VB program and FORTRAN program by transmitting parameters of functions, show calculating results of FORTRAN DLL functions on VB form and draw graphs for these results. Thus the graph interface of FORTRAN calculation program is added and the results of calculation are visualized. Some techniques of programming with mixed language are discussed in this paper.

详情信息展示

<上一页 1 下一页 >

有色金属在线官网  |   会议  |   在线投稿  |   购买纸书  |   科技图书馆

中南大学出版社 技术支持 版权声明   电话:0731-88830515 88830516   传真:0731-88710482   Email:administrator@cnnmol.com

互联网出版许可证:(署)网出证(京)字第342号   京ICP备17050991号-6      京公网安备11010802042557号