Dr.Lube
Guest
Bye to all,
seltsamerweise kann ich keine Gleichheit zwischen zwei Listenelementen überprüfen, wahrscheinlich ist der Befehl falsch, wie ich versuchte gleich und =
(7161.94 502.645) (7199.16 524.131) (7145.33 617.361) (7108.12 595.875)
und pnt_a = (7161.94 502.645)
gleich mi da sempre t, = Ich war schon immer
Wo ist der Fehler?
Danke, Dennis
ps. Ich weiß, dass ich das lösen kann, aber gibt es einen eleganteren Weg?
seltsamerweise kann ich keine Gleichheit zwischen zwei Listenelementen überprüfen, wahrscheinlich ist der Befehl falsch, wie ich versuchte gleich und =
Code:
(cond (equal pnt_a (nth 1 list_points))
(setq list_points (nth 1 list_points) (nth 2 list_points) (nth 3 list_points))
)
(gleich pnt_a (nth 2 list_points))
(setq list_points (nth 2 list_points) (nth 3 list_points) (nth 0 list_points) (nth 1 list_points))
)
(gleich pnt_a (nth 3 list_points))
(setq list_points (nth 3 list_points) (nth 0 list_points) (nth 1 list_points))
)
)
und pnt_a = (7161.94 502.645)
gleich mi da sempre t, = Ich war schon immer
Wo ist der Fehler?
Danke, Dennis
ps. Ich weiß, dass ich das lösen kann, aber gibt es einen eleganteren Weg?
Code:
(cond ((und (= (nth 0 pnt_a) (nth 0 (nth 1 lista_punti)))) (= (nth 1 pnt_a) (nth 1 (nth 1 lista_punti)))))
(setq lista_punti (Liste nth 1 lista_punti) (nth 2 lista_punti) (nth 3 lista_punti) (nth 0 lista_punti)))
)
((und (= (nth 0 pnt_a) (nth 0 (nth 2 lista_punti)))) (= (nth 1 pnt_a) (nth 1 (nth 2 lista_punti)))))
(setq lista_punti (Liste (nth 2 lista_punti) (nth 3 lista_punti) (nth 0 lista_punti) (nth 1 lista_punti)))
)
((und (= (nth 0 pnt_a) (nth 0 (nth 3 lista_punti)))) (= (nth 1 pnt_a) (nth 1 (nth 3 lista_punti)))))
(setq lista_punti (Liste nth 3 lista_punti) (nth 0 lista_punti) (nth 1 lista_punti) (nth 2 lista_punti)))
)
)