Returns the index of the specified list item
Supported Platforms: Windows, Mac OS, and Web
Signature
(vl-position symbol list)
- symbol
-
Type: Integer, Real, String, File, Symbol, Ename (entity name), T, or nil
Any AutoLISP symbol.
- list
-
Type: List
A true list.
Return Values
Type: Integer or nil
A numeric value containing the index position of symbol in list; otherwise nil if symbol does not exist in the list.
Note: The first list element is index 0, the second element is index 1, and so on.
Examples
(setq stuff (list "a" "b" "c" "d" "e")) ("a" "b" "c" "d" "e") (vl-position "c" stuff) 2