lisp2arx
Visual Programming for AutoLisp
Mathématiques en programmation Lisp..
doc2cpp,doc2lsp, sld2lsp, bmp2dcl,
free__GifCcapture for all-CAD'platforms..
|
Lista Forumurilor Pe Tematici
|
lisp2arx | Reguli | Inregistrare | Login
POZE LISP2ARX
Nu sunteti logat.
|
Nou pe simpatie: Profil elenn
| Femeie 24 ani Bucuresti cauta Barbat 24 - 55 ani |
|
admin
Administrator
Din: Bucharest
Inregistrat: acum 13 ani
Postari: 516
|
|
Hello Please you repair this source, for GnuLisp version 2.2 or CommonLisp.? I want transform the "(nn_vmload)" into GnuLisp? First crash I localize with (setq..... inside (nn_vmload) You call with (nn_vmload) at console
Code:
(defun nn_vmload ()
(setq
a1 (reduce '+ (list 272 480 757 1360 1561) 0)
b1 (reduce '* (list 4 11 25 3673) 1)
c1 (reduce (read "CSCE") (list 4 11 25 3673) 0)
d1 (reduce (read "ESCTNU") (list 4 11 25 3673) nil)
)
(princ "a1=")(princ a1)(terpri)
(princ "b1=")(princ b1)(terpri)
(princ "c1=")(princ c1) (terpri)
(princ "d1=")(princ d1) (terpri)
(setq labc (list "a" "b" "a" "a" "a" "c" "c")
a2 (taskf2 labc nil)
)
(setq
b2 (taskf3 labc nil)
)
(setq
d2 (taskf4 labc nil)
)
(princ "a2=") (princ a2)(terpri)
(princ "b2=")(princ b2) (terpri)
(princ "d2=")(princ d2)(terpri)
)
(princ "\nNn_vmload=")
(defun csce (v1 v2)
(if (numberp v1)
(+ v2 1)
v2
)
)
(defun reduce (f x v)
(if (null x)
v
(apply f (list (car x) (reduce f (cdr x) v)))
)
)
(defun taskf2 (vlc $rr)
(setq
$rr (if (and vlc (cadr vlc) (equal (car vlc) (cadr vlc)))
(taskf2 (cdr vlc) $rr)
(if (cadr vlc)
(cons (car vlc) (taskf2 (cdr vlc) $rr))
vlc
)
)
)
$rr
)
(princ "\nTaskf2")
(defun taskf3 (lst $rr)
(while lst
(setq $rr (cons (car lst) $rr))
(if (member (car lst) lst)
(setq lst (vl-remove (car lst) (cdr lst)))
)
)
$rr
)
(princ "\nTaskf3")
(defun taskf4 (lst $rr)
(setq
lst3 (car (list nil "rem=Store here all alreadyScannedValue/s"))
)
(while (car lst)
(setq
lres (cdr lst)
cnt (if (member (car lst) lst3)
0
1
)
)
(and (= cnt 1)
(while lres
(if (= (car lst) (car lres))
(setq cnt (+ cnt 1))
0
)
(setq lres (cdr lres))
)
)
(and (> cnt 0)
(setq lst3 (cons (car lst) lst3)
$rr (append $rr (list (cons cnt (car lst))))
)
)
(setq
lst (cdr lst)
)
)
$rr
)
(princ "\nTaskf4")
(defun esctnu (valorex outres)
(if (null valorex)
outres
(append outres (list valorex))
)
) |
60.4KB
_______________________________________
|
|
pus acum 3 ani |
|