long \ Language (API) \ Processing 1.0
Author: Casey Reas & Ben Fry
Description: Processing is an electronic sketchbook for developing ideas. It is a context for learning fundamentals of computer programming within the context of the electronic arts.
Keywords: Processing, Processing, Interactive Media, Electronic Arts, Programming, Java, Ben Fry, Casey Reas

Reference for Processing version 1.5. If you have a previous version, use the reference included with your software. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Javadoc.

Name | ### long
Examples |
    long a;          // Declare variable "a" of type int
    a = 23;          // Assign "a" the value 23
    long b = -256;   // Declare variable "b" and assign it the value -256
    long c = a + b;  // Declare variable "c" and assign it the sum of "a" and "b"
    int i = (int)c;  // Converts the value of "c" from a long to a int
Description | Datatype for large integers. While integers can be as large as 2,147,483,647 and as low as -2,147,483,648 (stored as 32 bits), a long integer has a minimum value of -9,223,372,036,854,775,808 and a maximum value of 9,223,372,036,854,775,807 (stored as 64 bits). Use this datatype when you need a number to have a greater magnitude than can be stored within an int. Processing functions don't use this datatype, so while they work in the language, you'll usually have to convert to a int using the (int) syntax before passing into a function.
Syntax |
    long var
    long var = value
Parameters |
var | variable name referencing the value
value | any integer value
Usage | Web & Application
Related | int

Updated on August 30, 2010 04:29:39pm EDT