topical media & game development
graphic-processing-learning-04-example-4-1-example-4-1.pde / pde
// Learning Processing
// Daniel Shiffman
// http://www.learningprocessing.com
// Example 4-1: Variable declaration and initialization examples
int count = 0; // Declare an int named count, assigned the value 0
char letter = 'a'; // Declare a char named letter, assigned the value 'a'
double d = 132.32; // Declare a double named d, assigned the value 132.32
boolean happy = false; // Declare a boolean named happy, assigned the value false
float x = 4.0; // Declare a float named x, assigned the value 4.0
float y; // Declare a float named y (no assignment)
y = x + 5.2; // Assign the value of x plus 5.2 to the previously declared y
float z = x*y + 15.0; // Declare a variable named z, assign it the value which
// is x times y plus 15.0.
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.