Function Entry: SUBST
← Prev | ↑ Chapter | Next → | Index | Symbols
Function Entry: SUBST
Name
subst
Class
Function
Syntax
(subst new old expr)
Arguments and Values
new: replacement valueold: value to replaceexpr: tree/list structure
Description
Substitutes new for occurrences of old within expr.
Return Values
Returns a copy of the list with new substituted for every occurrence of old.
If old is not found, Autodesk documents that the original list is returned unchanged.
Side Effects
None specified.
Examples
(subst 'qq 'b '(a b (c d) b)) => (A QQ (C D) QQ)(subst '(qq rr) '(c d) '(a b (c d) b)) => (A B (QQ RR) B)
Compatibility
Exact structural sharing versus reconstruction behavior remains to be tightened from dedicated documentation or tests.
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
- [subst (AutoLISP)](https://help.autodesk.com/cloudhelp/2023/ENU/AutoCAD-AutoLISP-Reference/files/GUID-25214E69-090A-45C3-8210-6D9801255E44.htm)
- Status: documented.