Function Entry: <
← Prev | ↑ Chapter | Next → | Index | Symbols
Function Entry: <
Name
<
Class
Function
Syntax
(< expr [expr ...])
Arguments and Values
- one or more expressions; with two or more, each adjacent pair must be two numbers, two strings, or include
nil(shared rules above).
Description
Returns T if each argument is less than the argument to its right — numbers by value, strings lexicographically by character code point, with nil below every other value. The pairs are compared left to right and the result is nil at the first pair that does not hold.
Return Values
- T if every adjacent pair holds, or with a single argument
- nil at the first pair that does not hold
Side Effects
Side effects are those of evaluating the arguments.
Examples
(< 1 2 3) => T(< "a" "b" "c") => T(< nil 1) => T;(< 1 nil) => nil—nilis the smallest value, never an error.(< 1 "a")signals a type error, as does a symbol or a list.(< 'a) => T— one argument is not checked;(<)signals an error (too few arguments).
Compatibility
See "The Comparison Operators , /, <, <=, >, >=" for the shared rules.
Availability
- AutoCAD 2022: measured (comparison-operators probe, 2026-09-25).
- BricsCAD V25 / V26: measured, identical to AutoCAD.
- Status: verified on both vendors.
Source Notes
- [< (AutoLISP)](https://help.autodesk.com/cloudhelp/2022/ENU/AutoCAD-AutoLISP-Reference/files/GUID-67C8900F-0491-4D91-AA05-9136639E7424.htm)
- Probe:
autolisp-front-end/tests/scenarios/language/comparison-operators-probe.lsp.