dvbbs
收藏本页
联系我们
论坛帮助
dvbbs

>> Fortran语言使用经验交流
搜一搜更多此类问题 
Fortran中文网Fortran中文网—Fortran语言经验交流Fortran语言使用经验交流 → 求高手帮助!

您是本帖的第 2824 个阅读者
树形 打印
标题:
求高手帮助!
sunyang
帅哥哟,离线,有人找我吗?
等级:新手上路
文章:7
积分:291
门派:无门无派
注册:2006年4月27日
楼主
 用支付宝给sunyang付款或购买其商品,支付宝交易免手续费、安全、快捷! 点击这里发送电子邮件给sunyang

发贴心情
求高手帮助!
我有编好的FORTRAN计算程序,想用VB做前端,原程序的初值是用.dat文件传递的,使用者只要改.dat文件的内容就可以计算了。我为了和设计好的前端连接,把主函数删了,把.dat文件删了,在读.dat文件处设初值,并把需要调用的函数设为.dll文件,准备在VB中调用初始参数,好让使用者在窗口中修改初值。但是,我在生成dll文件时出错,以下就是我改的程序,和出现的错误,不知道怎么改,希望各位熟悉的朋友帮帮忙。
原函数
Subroutine InitData()
Use Constant
Use Data_Cal
Implicit None
Integer      :: Unit,I,J
Character*70 :: InitFile
Unit=1
!//  数据文件和运动参数的初始化
InitFile="Input.dat"
Open(Unit,File=InitFile)
Call SkipLine(Unit); Read(Unit,*) Tbname
Call SkipLine(Unit); Read(Unit,*) TbSectNm
Call SkipLine(Unit); Read(Unit,*) Foilname
Call SkipLine(Unit); Read(Unit,*) Shear,Aw
Call SkipLine(Unit); Read(Unit,*) FlagVIn,Omg
Call SkipLine(Unit); Read(Unit,*) NLbd,NTht
我改后
Subroutine InitData()
!DEC$ ATTRIBUTES DLLEXPORT :: INITDATA
Use Constant
Use Data_Cal
Implicit None
Integer      :: Unit,I,J
Unit=1
!//  数据文件和运动参数的初始化
Character*70 :: Tbname,TbSectNm,Foilname
    integer ::  Shear,FlagVIn, NLbd,NTht
    Real*8 :: Aw,Omg
出错显示:
C:\Program Files\Microsoft Visual Studio\MyProjects\a\all.f90(183) : Error: A specification statement cannot appear in the executable section.
Character*70 :: Tbname,TbSectNm,Foilname
--------^
C:\Program Files\Microsoft Visual Studio\MyProjects\a\all.f90(184) : Error: A specification statement cannot appear in the executable section.
    integer ::  Shear,FlagVIn, NLbd,NTht
----^
C:\Program Files\Microsoft Visual Studio\MyProjects\a\all.f90(185) : Error: A specification statement cannot appear in the executable section.
    Real*8 :: Aw,Omg
ip地址已设置保密
2006/5/8 20:24:41

 1   1   1/1页      1    
网上贸易 创造奇迹! 阿里巴巴 Alibaba
Powered By Dvbbs Version 7.1.0 Sp1
Copyright ©2005 - 2008 www.fortran.cn
页面执行时间 0.09570 秒, 5 次数据查询
京ICP备05056801号