对
我明天会试着做这件事。
不是问题。
3: 当客户端按下enter键时,将设置上一个值。
我有一个测试程序,显示了原理。顺便说一句,如果有人用更优雅的方式做这件事,请告诉我。
问题是我必须检查变量是字符串还是数字。。。这需要一些时间
- ;; global vars, these will remember the last chosen values
- (setq
- pickvalue1 0
- pickvalue2 0
- )
- ;;
- (defun c:test ( / value1 value2 promprstring )
- (setq promprstring (strcat
- "\nEnter Value 1 <" (rtos pickvalue1) ">: "
- ))
- (setq value1 (getstring promprstring))
- (if (= value1 "")
- (progn)
- (setq pickvalue1 (atof value1))
- )
- (setq promprstring (strcat
- "\nEnter Value 2 <" (rtos pickvalue2) ">: "
- ))
- (setq value2 (getstring promprstring))
- (if (= value2 "")
- (progn)
- (setq pickvalue2 (atof value2))
- )
- (princ "\n")
- (princ pickvalue1)
- (princ " - ")
- (princ pickvalue2)
- (princ)
- )
1: 列的好处是:您不需要知道文本元素的长度(大小)。你是一排的。关于每个元素的字体大小和最大宽度有什么想法吗? |