Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Problems with reading FORMAT G

Anton_Helm
Beginner
388 Views
Hi,

I'm writing a small postproccesing script. I used to do some calculations with a compiled FORTRAN-program. The guy who wrote this program used for the output a format 'G8.2E1'. The problem is that sometimes I have an output with eight stars (********). This is probably a representation of FORTRAN that it can't write the value with the given format.

Is there a possibility to tell FORTRAN that it can understand the stars during a reading process?
Of course, I can edit everytime my output and change the values to 0.0 by my own, but I don't like this idea. I only know that the values are really small and close to zero. I would like just to start my program and then take a look on the things which are more important ;)

EDIT

How I would load a file (see attachment) with stars as a string array? My idea is to load this as a string array and transform it into an array of REALs.
0 Kudos
1 Reply
Steven_L_Intel1
Employee
388 Views
No - if the output has stars, that means the value is unrepresentable in the given format. Once the stars are there, you have completely lost any knowledge of the value.

You could read each line as a character string and write code that replaces strings of stars with '0.0' or some such, then do an internal READ from the string.
0 Kudos
Reply