Logicals converted to integers during reading



Hi,

I'd like to ask, if anybody knows what the standard says about the
conversion of "F", "T", ".f.", and ".t." to integers during reading.
For example:

program test

integer :: a

read(*,*) a
print *, "Value of a: ", a

end program test

If you run it, and enter T or F, ifort 9 converts it to -1 or 0. Other
compilers (g95 on i686, f95 on alphas) give a run-time error. Is it a
bug of ifort, or does the standard allows such a conversation?


Cheers,

Bálint

.



Relevant Pages