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 Feb 27 14:07:12 2024.

If you see any errors or have comments, please let us know.