Function Entry: AUTOLISP-SET-STATUS
← Prev | ↑ Chapter | Next → | Index | Symbols
Function Entry: AUTOLISP-SET-STATUS
Name
autolisp-set-status
Class
clautolisp Extension Function
Syntax
(autolisp-set-status status)
Arguments and Values
status– an integer process exit status. A real is truncated toward zero; a non-number raises:invalid-integer-argument.
Description
Record status as the process's pending exit status. The value is
stored on the runtime session (see autolisp-status to read it back)
and is later consumed by (quit) / (exit) with no argument, and by
the clautolisp CLI's normal end-of-run, so a batch script can report
pass/fail without calling quit explicitly.
Unlike the CLAL- helpers, this entry keeps the autolisp- prefix on
purpose: it is name- and semantics-compatible with the autolisp-set-status
that alfe injects into a driven AutoCAD / BricsCAD session (minus the
STATUSFILE write). A single C:MAIN test entry point that ends with
(autolisp-set-status (if ok 0 1)) is therefore portable across
BricsCAD, AutoCAD and clautolisp with no engine branch.
Return Values
status (the stored integer).
Side Effects
Sets the session's pending exit status.
Affected By
- The active dialect (see Exceptional Situations).
Exceptional Situations
:invalid-integer-argumentwhenstatusis not a number.- Under
--strict/--autocad/--bricscadthe call emits a non-fatal out-of-dialect WARNING (dialect problems warn, never error); the status is still recorded. Silent under--clautolispand--lax.
Examples
(autolisp-set-status 0) => 0 ; success recorded (autolisp-set-status 2.9) => 2 ; real truncated
Availability
- clautolisp: documented (this entry); implemented since clautolisp 1.2.26.
- AutoCAD / BricsCAD: not a native engine primitive, but the same name is provided by alfe's injected bootstrap when clautolisp drives those engines.
Source Notes
- clautolisp exit-status channel; see autolisp-set-status-and-quit-status.issue.