The test program below passes an array as an input argument to a subroutine without having defined the array values. Compile with /64 /undef /link, and open the EXE with SDBG64.
Press F7 (or 'step in'), and the line with 's = 0' is reached. Now, try to obtain information regarding the array, by hovering the mouse pointer on 'fct' in Line-17 or in the Variables pane. You will see 'REAL*8 Array size not known', even though the array size is the integer parameter NH4, whose value is 25. With the mouse pointer on 'fct' in Line-17, do right-click. You will see the puzzling message 'fct): Too many closing bracket' in the pop up that appears.
The same program, compiled in 32-bit mode with /undef /link and run in SDBG, does not have these problems. On the other hand, when F7 is pressed once and Line-15 is reached, the variables display now shows both FCT and FACT, even though the latter is not in scope.
I used FTN95 V 8.10.
module swmol_data
implicit none
integer, parameter :: dp = kind(0d0)
integer, parameter :: NH4 = 25
real(dp), dimension(NH4) :: fact
end module
subroutine excoef(fct,s)
use swmol_data, only : dp, NH4
implicit none
real(dp), intent(in) :: fct(NH4)
real(dp), intent(out) :: s
integer i
!
s = 0 ! note: fct() is undefined
do i=1, NH4
s=s+fct(i)
end do
return
end subroutine excoef
program xfact
use swmol_data
implicit none
real(dp) :: s
!
call excoef(fact,s)
print *,s
stop
end program