2013年11月20日星期三

Processing tutorial: data variables

Grammar is introduced:
int, float, boolean, true, false, =(assign), width, height

 
Processing data variables






variable
Int x;
Float y;
Boolean b;
X = 50;
Y = 12.6;
B = true;
Can also be assignment on one line:
Int x = 50;
Float y = 12.6;
Boolean b = true;
A line can declare multiple variables:
Float x, y, z;
X = 3.9;
Y = 10.01;
Z = 123.123;
Processing language variables
Processing language has a built-in variables used to store data.
The width and height of the window width, height.If not set the size (), then the width and height are set to 100.