hothua2020 发表于 2020-7-1 16:03:25

在函数体内定义函数的作用

本帖最后由 yxp 于 2020-7-1 17:19 编辑

(defun fff1()
    (alert "A:fff1")
)
(defun fff2()
    (alert "A:fff2")
)
(defun c:f1( / fff1);//不添加fff2 fff3
(defun fff1()
    (alert "B:fff1")
)
(defun fff2()
    (alert "B:fff2")
)
(defun fff3()
    (alert "B:fff3")
)
(fff1)
(fff2)
(fff3)
)
(fff1);alert "A:fff1"
(fff2);alert "A:fff2"
;(fff3);报错
(c:f1);alert "B:fff1" ->B:fff2->B:fff3
(fff1);alert "A:fff1"
(fff2);alert "B:fff2"被c:f1重新定义了
(fff3);alert "B:fff3"执行c:f1,子函数加载成功。


tryhi 发表于 2020-7-1 16:53:06

然后呢??
页: [1]
查看完整版本: 在函数体内定义函数的作用