Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

Unusual changing of initialized variable

$
0
0

There is subroutine like

subroutine A(x, N1, N2, Y)
implicit none
integer N1, N2
real*8 X, Y(N1:N2), P/0.0d0/, Z
 
write(7, *) P
...
P = Z
...
end subroutine a

At first call of A variable P prints right value 0.0d0, but at second call it prints non zero value. How it could be possible?

 


Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>