Hi,

I need to read in a data file generated by Fortran with double precision scientific notation, i.e.,
0.93028594D+02
which is formatted as "D10.8" in Fortran, and I got two questions:

(1) What's the best way to do in C? I have tried:

float data;
scanf(fp, "%e", &data);

or "%g" etc. but none gives me the desired value.

(2) If I manually change the letter "D" to "E", the number before read-in is 0.93028594E+02 (though unlikely I'll do things this way) and use "%e", I get a read-in value of 93.028595. How to avoid such a changed value?

Many thanks!

hz