Quantcast
Channel: Intel® Fortran Composer XE
Viewing all articles
Browse latest Browse all 1424

Internal read: want to read an integer into a real variable

$
0
0

I want to use an internal read as follows:

if (iStnPress /= 99999) read(iStnPress, '(f5.1)') StnPress

Here, iStnPress is declared an integer; StnPress is declared real.

Before the line is executed, iStnPress has been read as '9245'.

My hope was to have StnPress be set to '924.5'

Unfortunately, I get a runtime crash w/ IVF, with the hint that it's taking '9245' to be a unit number.

Any thoughts?  Am I trying to do the impossible?

 

 


Viewing all articles
Browse latest Browse all 1424

Trending Articles



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