read float into integer
Paul Thomas
paulthomas2@wanadoo.fr
Thu Aug 30 13:08:00 GMT 2007
Hello Paul,
Long time, no hear!
> pkienzle wrote:
>
>> I don't know if it is a bug, but gfortran does not truncate floating point
>> values toward 0 on input. The f90 code I'm trying to compile assumes that
>> it does.
>>
>>
>
> This seems to be a very special Intel Fortran Compiler feature as I get:
>
>
10.8.1 List-directed input
Input forms acceptable to edit descriptors for a given type are
acceptable for list-directed
formatting, except as noted below. The form of the input value shall be
acceptable for the type of
the next effective item in the list. Blanks are never used as zeros, and
embedded blanks are not
permitted in constants, except within character constants and complex
constants as specified
below.
When the next effective item is of type integer, the value in the input
record is interpreted as if an
Iw edit descriptor with a suitable value of w were used.
.....snip.....
When the next effective item is of type logical, the input form shall
not include slashes, blanks, or
commas among the optional characters permitted for L editing.
So I would say that the ifort behaviour is unexpected, if not a bug.
Cheers
Paul
More information about the Fortran
mailing list