TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Mark on October 23, 2003, 02:54:10 PM
-
Now that Mr. Madsen has returned, :D I'll ask this question. Given the list.
(setq a 2 b 4 c nil d 8)
(setq lst '(a b c d))
why do these not work?
$ (nth 2 lst)
C
_$ (null c)
T
_$ (not c)
T
_$ (null (nth 2 lst)) <-- here
nil
_$ (not (nth 2 lst)) <-- here
nil
_$
$ (type (nth 2 lst))
SYM
_$
What am I missing Stig?
-
Letting these statements speak for themselves:
(setq a 2 b 4 c nil d 8)
(setq lst_1 '(a b c d)) -> (A B C D)
(setq lst_2 (list a b c d)) -> (2 4 nil 8)
(null 'C) -> nil
(null (eval C)) -> T
(null (nth 2 lst_1)) = (null 'C)
(null (nth 2 lst_2)) = (null (eval C))
-
Cool.