So ich Ich versuche Lisp zu lehren, ich bin zur Zeit dieser Website als Referenz: https://www.tutorialspoint.com/lisp/lisp_if_construct.htmIf-Anweisung mit THEN-Klausel (LISP)
Ich verstehe nicht ganz, warum die dann Klausel ausgeführt wird, trotz der Tatsache, dass die If-Klausel falsch ist?
(setq a 10)
(if (> a 20)
then (format t "~% a is less than 20"))
(format t "~% value of a is ~d " a)
Die Ausgabe lautet:
a is less than 20
value of a is 10
Ist die dann Klausel nur immer ausführen, auch wenn die if-Anweisung falsch ist? (was in diesem Fall ist).
Jede Hilfe wäre willkommen, auch Entschuldigung, wenn meine Terminologie völlig falsch ist Ich bin noch neu bei Lisp!
Dieses Tutorial scheint ein bisschen Quatsch. Es gibt gute freie Lisp-Bücher online verfügbar, wie Peter Seibels [Practical Common Lisp] (http://www.gigamonkeys.com/book/). – molbdnilo