py-fortranformat
py-fortranformat copied to clipboard
FortranRecordWriter('(E10.0)').write([10.0]) => '**********'
>>> FortranRecordWriter('(E10.0)').write([10])
'**********'
>>> FortranRecordWriter('(E10.0)').write([10.0])
'**********'
>>> FortranRecordWriter('(E10.1)').write([10])
' 0.1E+02'
Hi, this is as expected - Gfortran actually crashes on this input, Intel Fortran outputs the above - try running the following against your compiler to get some examples ...
PROGRAM E_EDIT
IMPLICIT NONE
100 FORMAT ('[', E10.0, ']')
WRITE (*, 100) 0.0
WRITE (*, 100) 0.01
WRITE (*, 100) 0.1
WRITE (*, 100) 1
WRITE (*, 100) 1.1
WRITE (*, 100) 10.0
WRITE (*, 100) 1000.0
STOP
END
@hyperkang Have you been able to run this to check the behaviour? If so and it matches can we close?
/app/example.f90(5): remark #8577: The scale factor (k) and number of fractional digits (d) do not have the allowed combination of either -d < k <= 0 or 0 < k < d+2. Expect asterisks as output.
100 FORMAT ('[', E10.0, ']')
-----------------------^