Reader Syntax Entry: Integer Literal
← Prev | ↑ Chapter | Next → | Index | Symbols
Reader Syntax Entry: Integer Literal
Name
Integer Literal
Class
Reader Syntax
Concrete Syntax
integer ::= sign? digit+ sign ::= "+" | "-" digit ::= "0" | "1" | ... | "9"
Constituents
- optional sign
- one or more decimal digits
Description
An integer literal denotes a signed 32-bit integer value when its magnitude lies in the documented integer range.
Acceptance Rules
- documented examples include
2and-56 - no decimal point appears
- literals beyond the maximum integer range may be read as reals instead of integers
Strict/Lax Policy
- strict: accept only the conservative grammar above
- lax: may accept additional host-confirmed integer token forms if tests justify them
Examples
012-42+7
Compatibility
- Autodesk documents the range and prose semantics
- exact lexical grammar is inferred, not fully formalized
Notes
Some older or host-specific readers may accept additional token spellings, but those are not standardized here.
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
- [About Integers (AutoLISP)](https://help.autodesk.com/cloudhelp/2024/FRA/AutoCAD-MAC-AutoLisp/files/GUID-EF6114FC-F1E4-4C71-91CC-07D01E6C8ABB.htm)
- Status: documented in prose, formal syntax inferred.