Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner

Problem of Reading Data using Intel Fortran

Hi, 

Does anyone encounter problems like this? 

1. I have a data file for variables, and one line in the data file  is like below:

 40.4694     0.0     0.0    0.00    0.14     0.3   91.44   0.035    0.00    0.00

 One variable named CHN is supposed to store 0.14.

When reading this file, CHN becomes an integer 1041194025.  All other variables in that line are read correctly. 

2. Another similar problem is also about reading. A variable (ZTK) is expected to store 0.00 read from my data file. But when I ran the code, that variable actually becomes an integer 0. As it is read as the integer type, it will become 0 when given any values between 0 and 1. Again, all other variables in that line are read correctly.

Both variables (CHN, ZTK) are local variables and are not declared as integer or real at the beginning of the code. Could it be the problem? If it is the problem, why other variables are read correctly (including type and value).  

My compiler is Intel Fortran V19 integrated into VS2019 on Windows 7.

 

Thanks!  

0 Kudos