Function Entry: EXIT

← Prev | ↑ Chapter | Next → | Index | Symbols

Function Entry: EXIT

Name

exit

Class

Function

Syntax

(exit)
(exit status)        ; clautolisp extension

Arguments and Values

  • None on AutoCAD / BricsCAD.
  • status (clautolisp extension) — an optional integer process exit status, handled exactly as for quit (see that entry and autolisp-set-status).

Description

Unconditionally exits the running LISP code and terminates LISP processing for the current invocation. It is a non-local exit from the current LISP evaluation, not a process-level termination of the host CAD application.

clautolisp accepts an OPTIONAL integer status argument, identical in behaviour to (quit status): (exit N) terminates with exit code N, bare (exit) uses the pending autolisp-set-status value. Supplying the argument is a clautolisp extension and warns out of dialect.

Return Values

Does not return normally. Bricsys describes the channel-level behaviour as printing the message ; error : quit / exit abort to the prompt as the LISP top-level handles the abort.

Side Effects

Aborts the running LISP evaluation. Outstanding *error* handlers may run as the abort propagates.

Notes

exit and quit are documented by Bricsys with identical signatures and identical channel-level effect (both raise the same ; error : quit / exit abort message). Treat them as alternative spellings of the same primitive in the absence of further evidence; reserved separately so that AutoLISP code that names either one continues to read.

Availability

  • AutoCAD 2026: documented (Autodesk Error-Handling Functions Reference).
  • BricsCAD V26: documented (BricsCAD V26 dedicated per-symbol page).
  • Status: documented in both vendors. Phase-5 closure: BricsCAD's per-symbol page makes the abort-message-channel behaviour explicit and confirms that exit and quit are documented identically.

See Also

  • quit — companion form; identical signature and effect.
  • *error* — error handler that runs as the abort propagates.
  • vl-exit-with-error, vl-exit-with-value — namespace-scoped non-local exits for VLX.