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 or equal to 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 1 2) => T
  • (<= "a" "a" "b") => T
  • `(<= nil nil) > T ; (< 1 nil) => nil` — nil is 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