VB 版 (精华区)

发信人: zxfsnow (希望的春天), 信区: VB
标  题: VB中调用Fortran(转自水源)
发信站: 哈工大紫丁香 (2000年06月04日17:57:08 星期天), 转信

发信人: gnim (阿笨-2代), 信区: VB
标  题: VB中调用Fortran(转自水源)
发信站: 虎踞龙蟠 (Wed Apr 19 09:16:19 2000), 转信

最简单的如下例:
     Visual Basic applications can also call Fortran
functions and subroutines in the form of DLLs.
For example, the following Visual Basic code calls
the Fortran subroutine ARRAYTEST:

Static arr(1 To 3, 1 To 7) As Single
Call ARRAYTEST(arr(1, 1))

The subroutine ARRAYTEST is defined in the following
 Fortran code:

SUBROUTINE ARRAYTEST(arr)
   !MS$ATTRIBUTES DLLEXPORT :: ARRAYTEST
   REAL(4)  arr(3, 7)
   INTEGER i, j
   DO i = 1, 3
      DO j = 1, 7
         arr (i, j) = 11.0 * i + j
The subroutine ARRAYTEST is defined in the following
      END DO
   END DO
END SUBROUTINE 

 以科计为本,以产业报国!
  超越自我,飞跃无限!

※ 来源:·哈工大紫丁香 bbs.hit.edu.cn·[FROM: 202.118.235.249]
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.299毫秒