I have made a gfortran program which used the READ-statement to converse a string into a real.
Problem: When the string ('1.00000E-03') is read from a file with the command READ(line(54:67),*) t the program returns for t: 1.76617300510772955878279319145152225E-0003. This is a wrong conversion.
But when I write READ('1.00000E-03',*) t then the program returns 1.00000000000366461737654319145152225E-0003. It's OK.
Does someone recognize this failure? Who can help me?
John,
you have to read the AS real. Do something like this(and as you have not shown the type declarations):
Hope this will help.