不,不能。必须从lisp中单独加载子函数,并使其成为全局函数。
如果您运行包含子函数的lisp,并且没有将其从代码中清除,那么它将是全局的。
- (defun C:test ( / subfunction ) ;will release the sub-function from memory.
- ;; if sub-function isn't declared then it will be global
- ;; but this routine must be called first before the other
- ;; routines can call it.
-
- (subfunction)
- (functions)
- )
- by doing this one below
- (subfunction) ; by making this global any of you routine can call this function
- (defun C:test2 ()
- (subfunction)
- )
- (defun C:test3 ()
- (subfunction)
- )
这就是为什么我们将*error*函数声明为局部函数的原因。 |