replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - KIND & SELLECTED_INT_KIND
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 

KIND & SELLECTED_INT_KIND

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



Joined: 11 Apr 2005
Posts: 371

PostPosted: Fri Oct 06, 2006 7:23 am    Post subject: KIND & SELLECTED_INT_KIND Reply with quote

At the risk of asking a stupid question ... as I upgrade code from "FTN77" to "FTN95", I occasionally get the following output during compilation:

comment 981 - Specifying the kind of the type INTEGER with the constant '2' is non-portable - 'SELECTED_INT_KIND(4)' would be better

I understand what the comment means. However, the suggested portable solution does not seem correct to me. As I understand it:

* kind = 2 implies 2 bytes of storage i.e integers between -32760ish and +32760ish (can never remember which end gets the extra non-zero value)

* selected int_kind (4) implies integers between -10^4 and +10^4 i.e between -9999 and +9999

I accept that the two can not be mapped exactly onto each other, but I think selected_int_kind (5) is the correct portable solution. What is incorrect: the compiler comment, or my understanding?

Andy
Back to top
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


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

PostPosted: Fri Oct 06, 2006 10:02 am    Post subject: KIND & SELLECTED_INT_KIND Reply with quote

Andy

selected_int_kind(5) = 3.

You need INTEGER*4 for to store 99999.

selected_int_kind (n) = 2 for n = 3 or 4.
Back to top
View user's profile Send private message AIM Address
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