Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Overflow of Integer expression? what does this mean?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
GillaMobster




PostPosted: Sat Jan 08, 2005 11:08 am   Post subject: Overflow of Integer expression? what does this mean?

K so I keep getting this error, but I dont know what it means, thus it is hard to fix.

heres the line of code

code:

 holder := (1 - (reference ** 2 - longest ** 2 - distance ** 2) / (-2 * longest * distance))


So anyone know how to fix this, or even what the error means? I can prob fix it if I know what it means.
Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Sat Jan 08, 2005 11:15 am   Post subject: (No subject)

The error means you are dealing with an integer that is greater than maxint or less than minint. Try doing put maxint or put minint to see what the values for these numbers are, or check the Help file.
To fix it, you could try making your integer variables real numbers. Turing doesn't mind really big real numbers Smile
As you can see:
code:

put maxint + 1

gives you an error, but this doesn't:
code:

put intreal (maxint) + 1

Hope that helps,
-Cervantes
GillaMobster




PostPosted: Sat Jan 08, 2005 11:28 am   Post subject: (No subject)

okay thanks, i changed my ints used in that line of code to reals, and now I dont get that error anymore.
I do get a different one, but I think I can fix it.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: