Quantcast
Channel: Fortran
Viewing all articles
Browse latest Browse all 3108

strange problem of DATA statement

$
0
0

      When I assign initial values to variables using the DATA statement, such as ,

integer(kind=4):: nss
DATA nss /86400/

then I print out the value of nss, the result is 86527. I don't konw why this happens.

In the same way

integer(kind=4) ::month(12)
DATA month/31,28,31,30,31,30,31,31,30,31,30,31/

then I print out the value of month(1), the result is 255. So odd , isn't it ? Can someone help me to give an explanation for this ? Thank you very much.

The compile which I am using is IVF14.0 integrated with VS2012.

 


Viewing all articles
Browse latest Browse all 3108

Trending Articles



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