Name

Globals

Examples
# We create the global x by declaring it outside of a function. 
x = 0

def keyPressed():
    # We want to modify the global x. 
    global x 
    x = x + 1

def draw():
    # We wish to read the global x.
    ellipse(x, height / 2, 10, 10)
Description
Syntax
Updated on Wed Jan 18 17:32:21 2017.
Creative Commons License