lockmyeye说的没错!
可是,即便那样也不行!
原因是,对initget的机制没了解透!
帮助文件原文这样写:The control bits and keywords established by initget apply only to the next user-input function call. They are discarded after that call. The application doesn't have to call initget a second time to clear special conditions.
但是康X编著的《AutoCAD 2002/2000 Visual LISP》却漏了一句话:“They are discarded after that call.”而且后续的翻译也不完整,误死人!害死人!
现在,我弄懂了:
(defun C:GETKEY (/ key)
(initget 1 "A B C")
(while (setq key (getkword "\nA or B or C:"))
(initget 1 "A B C")
)
(princ)
)