forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

floating number out of range

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
louwee



Joined: 01 Mar 2006
Posts: 4

PostPosted: Wed Mar 01, 2006 12:30 pm    Post subject: floating number out of range Reply with quote

I am using FTN95 to compile my F77 codes. A strange thing happened:
a val defined as REAL*8 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 REAL*10, is it?
thank you.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Thu Mar 02, 2006 1:03 am    Post subject: floating number out of range Reply with quote

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.

Back to top
View user's profile Send private message AIM Address
louwee



Joined: 01 Mar 2006
Posts: 4

PostPosted: Thu Mar 02, 2006 12:20 pm    Post subject: floating number out of range Reply with quote

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.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Thu Mar 02, 2006 1:27 pm    Post subject: floating number out of range Reply with quote

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.

Back to top
View user's profile Send private message AIM Address
louwee



Joined: 01 Mar 2006
Posts: 4

PostPosted: Thu Mar 02, 2006 3:39 pm    Post subject: floating number out of range Reply with quote

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.
Back to top
View user's profile Send private message
JohnH



Joined: 26 Sep 2005
Posts: 13

PostPosted: Fri Mar 03, 2006 1:19 am    Post subject: floating number out of range Reply with quote

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.
Back to top
View user's profile Send private message
louwee



Joined: 01 Mar 2006
Posts: 4

PostPosted: Fri Mar 03, 2006 10:21 am    Post subject: floating number out of range Reply with quote

it helps. thank you very much for information.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group