I am using FTN95 to compile my F77 codes. A strange thing happened: a val defined as REAL8 which is supposed to have a range of about +/- 1E+308. but in fact as far as the val is given a value larger than 1E+38, the compiler complains: ' error 635 floating number out of range'. what happened to FTN95 here? It is supposed to support REAL10, is it? thank you.
floating number out of range
It is possible that the actual value is not what you think and is out of range. Try stepping through the code with the debugger and look at the values used at the point where the error occurs.
Alternatively, if you can reproduce the problem in a few lines of code, you can post the code here.
Thanks I found it is my mistake. Ever after I replaced 1.E+80 with 1.D+80, the problem is resolved. Sorry I am not quite familiar with Fortran yet. However, there comes another problem: it says 'call to missing routine: _HOSTNM ...' when I run the executable. I noticed it did give a warning message when building it. What is this _HOSTNM routine? Thank u once again.
You should search through your code for HOSTNM. It might be a spelling mistake or, as it says, a routine that you have used but not defined.
thanks, sorry I did not make it clear. i know what 'hostnm' is. the code compiles fine under linux, but it seems like the routines like hostnm, getlog etc are not supported in the window version, are they? Or do you have corresponding routine to replace them in windows in FTN95? thank you.
hostnm, getlog are not supported because they are not part of the Fortran 95 standard, nor were they part of the Fortran 77 standard either ! They would have been vendor 'extensions' to the standard by your Linux compiler. It is always dangerous to include non standard source code, since the program then becomes unportable as you have found here. However with FTN95 you can use calls like getenv@ to get values of environmental variables, for instance using getenv@ to get the value of COMPUTERNAME might be able to replace your call to hostnm.
it helps. thank you very much for information.