FAQ
 
 
Cover  \ Exhibition  \ Learning  \ Reference  \ Download  \ Discourse   
      Language \ Environment \ Libraries \ Comparison
 
   
   
Abridged (A-Z) \ Complete (A-Z)  
   
  Reference for Processing (BETA) version 91+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.  
Name  

= (assign)

   
Examples  
int a; 
a = 30;  // Assigns for value 30 to the variable "a" 
a = a + 40;  // Assigns the value 70 to the variable "a" 

Description   Assigns a value to a variable. The "=" sign does not mean "equals", but is used to place data within a variable. The "=" operator is formally called the assignment operator. There are many different types of variables (int, floats, strings, etc.) and the assignment operator can only assign values which are the same type as the variable it is assigning. For example, if the variable is of type int, the value must also be an int.
   
Syntax  
var = value
   
Parameters  
var   any valid variable name

value   any value of the same type as the variable. For example, if the variable is of type "int", the value must also be an int

   
Usage   Web & Application
   
Related   += (add assign)
-= (subtract assign)
 
 






   
 
Updated: Fri Jul 15 16:35:30 PDT 2005
 
 








Creative Commons License
 
  Processing is an open project initiated by Ben Fry and Casey Reas  
  © Info