We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › data type higher than int
Page Index Toggle Pages: 1
data type higher than int? (Read 931 times)
data type higher than int?
Feb 9th, 2008, 5:25pm
 
Is there an integer type of object that can go higher than the int's 2147483647?
I need something that can go up to 10000000000 (at least).
Re: data type higher than int?
Reply #1 - Feb 9th, 2008, 7:02pm
 
"long" can go up to 9223372036854775807.
Re: data type higher than int?
Reply #2 - Feb 9th, 2008, 11:19pm
 
ah thanks Smiley
that's more than enough...
Re: data type higher than int?
Reply #3 - Jun 16th, 2009, 5:52pm
 
Hi, I've got a problem with the long data type. It seems processing recognizes my long as an int.
For example, when I write,

long a=2200000000;
println(a);

Processing gives me: The literal 2200000000 of type int is out of range. Why is that?
Re: data type higher than int?
Reply #4 - Jun 16th, 2009, 6:03pm
 
2200000000 is a literal integer.
2200000000L is a literal long.

cf 'c' being a literal character and "c" being a literal string, or 1.0f being a literal float.
Re: data type higher than int?
Reply #5 - Jun 16th, 2009, 6:11pm
 
Thanks a lot!  Smiley   The example for the long data type didn't have an L at the end in the processing reference.
Page Index Toggle Pages: 1