Intrinsic Procedure 'ISNAN' in GNU FORTRAN 77
Hi! FORTRAN experts. I need your help.
I am using an 'ISNAN' Intrinsic Procedure in my FORTRAN code. Under Windows with DEC Fortran 77 complier, it is working well. But when I put it to a unix system and compile it with GNU FORTRAN 77 complier, it is not working. And later I found there is not such an Intrinsic Procedures in GNU FORTRAN 77.
What can I do to make my program work under GNU FORTRAN 77? I need your suggestions.
Thank you very much.
Re: Intrinsic Procedure 'ISNAN' in GNU FORTRAN 77
You might want to try testing a value for equality with itself. If c=NAN, then (c .eq. c) is false (on my system, anyway).
I had exactly the same problem a few years back, and this was the easiest thing to do in my case. I think that this should work on other compilers, as I think that NAN is never equal to anything. It is a bit kludgy, so there might be a better solution.
|All times are GMT -4. The time now is 05:30.|