Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fortran format 1P10E11.3

Does anyone know what this format line means in fortran:

FORMAT(1x,F7.0,2x,1P10E11.3)

I know the first part is one repetition of float number but I don't understand how many exponential data points are read in the second part and what that P is for.

like image 639
user3780714 Avatar asked Mar 19 '23 05:03

user3780714


1 Answers

The P format shifts the decimal point. The behavior is different on input and output. On output, applied to an E format, it shifts the decimal point of the value before the exponent and changes the values of the exponent such that the value of the number is unchanged. If plain E would output 0.123E+3, 1PE will output 1.230E+2. On input it changes the value read -- use with great caution or not at all. Another "gotcha" is that P stays in effect for the rest of the format, until another P specifier appears in the format, e.g., 0P to reset. One of the newer G, ES or EN formats are generally better than the combination of P and E.

like image 77
M. S. B. Avatar answered Mar 23 '23 09:03

M. S. B.