Logicals converted to integers during reading
- From: "Bálint Aradi" <aradi@xxxxxxxxxxx>
- Date: 28 Jul 2006 06:21:09 -0700
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
.
- Follow-Ups:
- Re: Logicals converted to integers during reading
- From: Steve Lionel
- Re: Logicals converted to integers during reading
- From: dpb
- Re: Logicals converted to integers during reading
- Prev by Date: Re: timer function calls in Fortran77
- Next by Date: Re: timer function calls in Fortran77
- Previous by thread: timer function calls in Fortran77
- Next by thread: Re: Logicals converted to integers during reading
- Index(es):
Relevant Pages
|