You can stretch it some by using #July 5 2008 at 9:42 AM
|Pete (Login The-Universe)|
Response to Numbers bigger than 1,000,000,000
PRINT x# + x#
Also check it with numbers like:
x# = 100000000002345#
x# = VAL("100000000002345")
Integers are limited to -32768 to 32767 but double precision numbers go much further. You can also use DIM x as DOUBLE at the top of your program as in:
DIM x as DOUBLE
PRINT x + x
Double precision will give you up to 15-digits to use for the sum of your numbers. Beyond that, you would need to convert with strings and a function to add together. I know you stated integers, which means you could use long (&) but double allows for larger integers than long does, even though it 'doubles' for decimal numbers.
Personally, I always like to convert to strings for most applications to avoid other problems but if this gets you by for what you need, great. I would like to know what type of project you are working on and if you need some help in the future, just post the code you have so far and ask for help where you are stuck?
|This message has been edited by The-Universe on Jul 5, 2008 9:55 AM|