 - (defun c:tt(/ text lst aa e1 b)
- (setq text "pm=30+30+30+44+44+44+44"
- lst '()
- )
- (if (vl-string-position (ascii "=") text)
- (progn
- (setq e1 (vl-string-position (ascii "=") text))
- (setq dx (strcat (substr text 1 e1) "="))
- (setq aa (substr text (+ e1 2)))
- )
- )
- (while
- (vl-string-position (ascii "+") aa)
- (setq e1 (vl-string-position (ascii "+") aa))
- (setq b (substr aa 1 e1))
- (setq lst (cons b lst))
- (setq aa (substr aa (+ e1 2)))
- )
- (setq lst (cons aa lst))
- (while
- (/= lst nil)
- (setq aa (nth 0 lst)
- lst1 lst
- )
- (setq lst(vl-remove aa lst))
- (setq dx (strcat dx (itoa (- (length lst1)(length lst))) "*" aa "+"))
- )
- )
|