?
Solved

Adding gone wrong

Posted on 2011-04-28
4
Medium Priority
?
223 Views
Last Modified: 2012-05-11
Hi, this happened when adding allot of numbers together I get a negative result? how could I fix this?

-1565903897
0
Comment
Question by:eNarc
  • 2
  • 2
4 Comments
 
LVL 32

Accepted Solution

by:
Ephraim Wangoya earned 2000 total points
ID: 35485372

Use a larger data type like Int64 or Double
0
 
LVL 5

Author Comment

by:eNarc
ID: 35485387
its uses Int64;


-2050180960
-1851261970/198918990

0
 
LVL 5

Author Comment

by:eNarc
ID: 35485392
doh, it was integer; lol thanks.
0
 
LVL 32

Expert Comment

by:Ephraim Wangoya
ID: 35485398

If you dont expect negative numbers for your result, you can also use

UInt64
or
Extended
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month16 days, 7 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question