Function Entry: GETINT
← Prev | ↑ Chapter | Next → | Index | Symbols
Function Entry: GETINT
Name
getint
Class
Function
Syntax
(getint [msg])
Arguments and Values
msg: optional prompt string
Description
Prompts the user for an integer value.
Return Values
Integer or nil.
Side Effects
- prompts the user
- consumes interactive input
Exceptional Situations
Invalid input, cancel, or interactive state errors are host-dependent.
Availability
- AutoCAD 2026: documented (per Autodesk reference page).
- BricsCAD V26: presumed compatible (no contradicting page found).
- Status: AutoCAD documented; BricsCAD presumed-both pending Phase 4 verification.
Source Notes
Notes
- Autodesk documents an accepted range of
-32768to+32767. - Autodesk documents that invalid non-integer input causes a retry prompt with a diagnostic message.
- Autodesk documents that the user cannot respond with another AutoLISP expression.
clautolisp
clautolisp implementation deviation — not part of the normative
specification above. AutoCAD and BricsCAD collect this integer through
the graphical drawing editor's command line (implicitly a GUI).
clautolisp has no drawing editor — it writes the prompt to the standard
output and reads the answer as one line of text from the standard input
(a TUI interaction). Interactively this is the REPL's terminal; for
scripted, deterministic runs it is the file attached with --mock-input.
A live CAD host, when connected, restores the native GUI behavior. On the
TUI the line must parse as an integer; non-integer input returns nil
rather than issuing the GUI host's retry prompt.