newLISP 10.1.2 issues

Started by dvebc, August 27, 2009, 02:36:12 PM

Previous topic - Next topic

dvebc

#15
Quote from: "Sammo"Work for me after replacing the ASCII 92 character you used as a single quote with a bonafide single quote character ASCII 27.  Here is the working code:



(define number-list '(100 300 500 701 900 1100 1300 1500))

(dolist (n number-list (!= (mod n 2) 0))

(println (/ n 2)))


Thanks Sammo ,



That works now

still I am confused which function is executed first in this code,



(dolist (n number-list (!= (mod n 2) 0))



regards

Sammo

#16
In this code



(dolist (n number-list (!= (mod n 2) 0)) (println (/ n 2)))



symbol n is assigned the value of an element of number-list after which function (!= (mod n 2) 0) is evaluated. If number-list has no elements, the dolist function terminates without having evaluated the [exp-break] function or the [body] of the dolist expression.

ale870

#17
Thank you. I must admit that code was a small labyrinth even for me!
--