(mapcar
'(lambda (a)
(set a 1)
)
'(varA varB varC)
)
(set (read "varD") 1)
(setq varE 1 varF 1)
(eval (read "(setq varG 1)"))
but they either require running the code to get a list of atomsOr not... :)
Maybe something along these lines would help:Code - Auto/Visual Lisp: [Select]
;; Get atoms ;; Your code here ;; Look for items that did not exist in list '*atoms*' ;; Localize ;; Print resultsQuotebut they either require running the code to get a list of atomsOr not... :)
(defun test ( / fun1 fun2 s1 s2 d g)
(defun fun1 (p / a b c)
(setq a 10)
(setq b 20)
(setq c (+ a b))
(setq d (* p c))
d
);_end_defun_fun1
(defun fun2 (/ e f )
(fun1 3)
(setq e 2)
(setq f 10)
(setq g (* d (* e f)))
g
);_end_defun_fun2
(fun2)
(setq s1 20)
(setq s2 (* s1 g))
s2
);_end defun
How test for this function ?Replace line 4 in ronjonp's code with:
(defun test ( / fun1 fun2 s1 s2 d g)
...
)
(test)
And load the code in a new drawing.
How test for this function ?Replace line 4 in ronjonp's code with:Code: [Select](defun test ( / fun1 fun2 s1 s2 d g)
And load the code in a new drawing.
...
)
(test)