4 Dec 2016 7:14
#18512
When the active line is within a function declared with a RESULT(<var>) clause, the result variable is displayed by SDBG as a 'NULL pointer'. For example, use the program
program tst
implicit none
!
integer :: ix, iy
!
ix = 7
iy = sqr(ix)
write(*,*) ix,iy
CONTAINS
function sqr(ix) result (s)
integer :: ix, s
s = ix*ix
return
end function
end program
and place a breakpoint at the 'RETURN' statement. When the breakpoint is hit, examine the Variables pane for the value of S.