FORTRAN Formatting on Input/Output
Posted on 2012-09-20
I am working with Fortran 77 and Fortran 90 code, some of which is converted and some that is melded together. I have come across a formatting descriptor that I can not find anywhere in any reference. Generally, it seems to be used for an integer conversion. For example, a variable containing the number 810000 (as an integer) is written out to obtain 8.10000 as a result using dfloat, but the descriptor is -5PF9.5. I cannot find any information anywhere as to what the -5 or the P means. I know, for instance, if it had been 2F5.2, it would mean to repeat 5.2 twice, but the -5PF9.5 is not the same and I'm baffled as to where this comes from. I'm guessing that the -5 has something to do with the decimal being inserted 5 places to the left (in this case), but why the 'P'? Does anyone have any insight into the '-5P' portion here? I've seen different negative numbers, but there is always a P.