求高手帮助!
我有编好的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
原函数
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