Name

exit()

Examples
def draw():
    line(mouseX, mouseY, 50, 50)

def mousePressed():
    exit()
Description Quits/stops/exits the program. Programs without a draw() function exit automatically after the last line has run, but programs with draw() run continuously until the program is manually stopped or exit() is run.

Rather than terminating immediately, exit() will cause the sketch to exit after draw() has completed (or after setup() completes if called during the setup() function).

Syntax
exit()
Updated on Tue Jul 11 06:52:23 2017.
Creative Commons License