Function Entry: CLAL-SYSVAR-APROPOS

← Prev | ↑ Chapter | Next → | Index | Symbols

Function Entry: CLAL-SYSVAR-APROPOS

Name

clal-sysvar-apropos

Class

clautolisp Extension Function

Syntax

(clal-sysvar-apropos pattern)

Arguments and Values

  • pattern – string. Compared case-insensitively against every sysvar name in (clal-sysvar-list). The empty string matches every entry; a string that matches no entry returns nil.

Description

Return the subset of (clal-sysvar-list) whose names contain pattern as a (case-insensitive) substring. Useful at the REPL for discovery: (clal-sysvar-apropos "ANG") surfaces ANGBASE, ANGDIR, and the snap/orient angle family.

Return Values

A proper list of AutoLISP strings – a (possibly empty) subset of (clal-sysvar-list), in the same lexicographic order.

Side Effects

None.

Affected By

  • Same as clal-sysvar-list.

Exceptional Situations

  • :invalid-argument when pattern is not a string.
  • :host-not-supported when the host backend has not specialised host-sysvar-names (e.g. NullHost).

Examples

(clal-sysvar-apropos "ANG")
=> ("ANGBASE" "ANGDIR")

(clal-sysvar-apropos "ang")            ; case-insensitive
=> ("ANGBASE" "ANGDIR")

(clal-sysvar-apropos "ERRNO")
=> ("ERRNO")

(clal-sysvar-apropos "DEFINITELY-NOT-A-SUBSTRING")
=> nil

(length (clal-sysvar-apropos ""))      ; empty pattern -> all
=> 1836

Availability

  • clautolisp: documented (this entry); implemented since clautolisp 1.0.76.
  • AutoCAD: NOT present.
  • BricsCAD: NOT present.

Source Notes

  • clautolisp-only extension; see this chapter's Overview.