这就是OP打算将lsp转换为vlx文件的原因。
无论如何,我不知道diesel函数可以比较“字符串数”:
- _$ (> "20170102" "20170101")
- T
- _$ (> "20161121" "20170101")
- nil
- _$
此外,如果使用visual lisp,这样的方式可能更可取:
- (defun C:test ( / )
- (and
- (> (rtos (getvar 'cdate) 2 0) "20170101") ; 1st Jan 2017
- (not (alert "This function is expired!\nPlease contact: 1234567890"))
- (vl-exit-with-value T)
- )
- (alert "\nThe main funciton is running.")
- (princ)
- ) (vl-load-com)
因为(退出)/(退出)退出时出错。 |