/* Variable Scope LOCAL: means variable is declared inside a function / method thus is only visible to that specific function / method. Nowhere else GLOBAL: variable is declared at the top and is visible to be used by ALL functions / methods -> you can't reuse that variable name anymore Variable Types int: INTEGER thats numbers both positive and negative, but NO decimals float: FLOAT PRECISION decimal numbers String: words and sentences and such, can also hold numbers but they will be treated like words boolean: a TRUE or FALSE When you declare a variable, stating the type specifies the size of memory needed to store it. Example, boolean true or false data takes less room than big numbers or entire words ASSIGNMENT make a sketch, size it 640 by 480 declare 3 integers and 3 strings make those all global display them in a screen, colours are whatever make 3 more variables of any type but them local to the draw function again display the things call you sketch: program1 */ //Declarations for GLOBAL variables go here int white; //Runs once at the start of the program void setup() { int bob = 0; //Local variable white = 61; //Global global size(640, 480); //Sets the size of the program display } //Runs continuously void draw() { String bob = "stuff"; //Local variable fill(255, 115, 255); //Choose a color rect(0, 0, 640, 480); //fill a rectangle the ize of the screen fill(100, 100, 100); //Gat another color text("testing teh words" + white, 200, 200); //write words } //Runs when the mouse is pressed void mousePressed() { println("this is other thing: " + white); //Accesses the global variable 'white' }