马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
[Actionscript3] 纯文本查看 复制代码 (defun yqz::get:maxfh(lst / lst-rp)
(defun get::e(lst-rp lst / e len len1 lst-a)
(while (setq e (car lst-rp))
(setq len (length lst)
lst (vl-remove e lst)
lst-rp (cdr lst-rp)
);;;setq
(if lst
(setq len1 (length lst))
(setq len1 0)
);;;if
(setq lst-a (cons (list (- len len1) e) lst-a))
);;;while
(cadar
(vl-sort lst-a
'(lambda(a b)
(if (= (car a) (car b))
(< (cadr (assoc (cadr a) *lst-fh*))
(cadr (assoc (cadr b) *lst-fh*))
);;;
(> (car a) (car b))
);;;if
);;;lambda
);;;vl
);;;cadar
);;;defun
(setq *lst-fh* '(("%%132%%140R%%141" 360.)("%%132" 360.)("%%133" 435.)("%%131" 300.)("%%130%%140RH%%141" 430.)));;构造钢筋符号、强度值表
(setq lst-rp (xd::list:removedup lst))
(if (= (length lst-rp) 1)
(car lst-rp)
(get::e lst-rp lst)
);;;if
);;;defun
实例:
1、(setq lst '("%%132" "%%132" "%%132" "%%132" "%%132" "%%132" "%%132"
"%%132" "%%132" "%%132" "%%132" "%%132" "%%132" "%%132" "%%132" "%%132" "%%132"
"%%132" "%%132" "%%132" "%%132" "%%132" "%%132" "%%132" "%%132" "%%132" "%%132" "%%133" "%%133" "%%130%%140RH%%141"))
返回值:"%%132"
2、(setq lst '("%%133" "%%133" "%%132" "%%132" "%%130%%140RH%%141" "%%130%%140RH%%141"))
返回值:"%%132"
|