Fortran Coder

查看: 9736|回复: 8
打印 上一主题 下一主题

[调试器] Debug时 allocate 分配数组显示为 undefined

[复制链接]

136

帖子

3

主题

0

精华

版主

F 币
1964 元
贡献
1677 点

帅哥勋章管理勋章爱心勋章新人勋章热心勋章元老勋章

楼主
发表于 2014-10-31 11:15:30 | 显示全部楼层
不知道你怎么弄的,反正我这没问题
[Fortran] 纯文本查看 复制代码
   MODULE module_defi_Val
    Integer   :: iVal
    Contains 
    Subroutine setValue()
    Implicit None
        iVal = 2
    Return
    End Subroutine setValue
    End MODULE module_defi_Val
!*****************************************************************************!
    MODULE module_defi_array
    Use module_defi_Val
    IMPLICIT NONE
    REAL(kind=8),allocatable :: x(:)
    CONTAINS
    Subroutine allocateArray()
    Implicit None
        Allocate( x(iVal) )
        x = 1
    Return
    End Subroutine allocateArray
    End MODULE module_defi_array
!*****************************************************************************!
    Program www_fcode_cn
    Use module_defi_Val
    Use module_defi_array
    Implicit None
    call setValue
    call allocateArray
    write(*,*) x 
    Stop
    End Program www_fcode_cn
您需要登录后才可以回帖 登录 | 极速注册

本版积分规则

捐赠本站|Archiver|关于我们 About Us|小黑屋|Fcode ( 京ICP备18005632-2号 )

GMT+8, 2024-5-5 19:05

Powered by Tencent X3.4

© 2013-2024 Tencent

快速回复 返回顶部 返回列表