Function Entry: GETREAL
← Prev | ↑ Chapter | Next → | Index | Symbols
Function Entry: GETREAL
Name
getreal
Class
Function
Syntax
(getreal [msg])
Arguments and Values
msg: optional prompt string
Description
Prompts the user for a real-number value.
Return Values
Real or nil.
Side Effects
- prompts the user
- consumes interactive input
Compatibility
This function is an important bridge between textual/numeric input and the host's numeric conventions.
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 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 real 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 is read as a real number; input that is not a number returns
nil rather than re-prompting.