Global variable in LISP & MDI
I have found a serious problem in using of global variables in LISP. It is case of AutoCAD compatibility violation. You can test next sample:1) In current drawing (e.g. drawing1) type :(setq gv dr1)(print gv)returned dr1 . It is OK2) Create new drawing (e.g. drawin2). You can test varible gv by typing(print gv)returned nil. It is OK, because LISP works in separated namespaces, isnt it.3) Now you can set gv in this drawing(setq gv dr2) (print gv)returned dr2It is OK still.4) Make current drawing1 and test(print gv)returned dr2 !!!It is bug, isnt it?Does somebody know how to solve this problem?
0
Comments
-
Until they fix the bug, I suggest that you have to set to nil any variable you use in a Lisp routine.
0
This discussion has been closed.