REBOL 3 Docs | Guide | Concepts | Functions | Datatypes | Errors |
TOC < Back Next > | Updated: 3-Aug-2010 Edit History |
Stops evaluation and exits the interpreter.
Refinements:
/return - Returns a value (to prior script or command shell)
value - Note: use integers for command shell
/now - Quit immediately
See also:
You can call quit to exit (terminate) your program at any point.
time: 10:00 if time > 12:00 [ print "time for lunch" quit ]
Without refinements, quit is a non-forceful exception (it will throw a quit exception.) This behavior allows a parent program to stop the termination.
To force an immediate quit (no exception), use the /now refinement:
if bad-data [quit/now]
You can also return an integer! quit code to the operating system (shell) by using the return refinement:
quit/return 40
Note that not all operating systems environments may support this quit code.
TOC < Back Next > | REBOL.com - WIP Wiki | Feedback Admin |