_$ (setq cnt 0) (setq rad 0) (setq n 200) (repeat n (cond ((and (>= cnt rad)(< n rad)))) (setq rad (+ cnt rad)) (princ "\n")(princ "(setq rad")(princ " ") (princ rad)(princ ")") (setq cnt (1+ cnt)) ) 0 0 200 (setq rad 0) (setq rad 1) (setq rad 3) (setq rad 6) (setq rad 10) (setq rad 15) (setq rad 21) (setq rad 28) ---------------------------etc..... Why my repeat program jumping,I would plan like this (setq rad 0) (setq rad 1) (setq rad 2) (setq rad 3) (setq rad 4) (setq rad 5) (setq rad 6) (setq rad 7) ---------------------------etc.....
Look closely, Ade. It is doing exactly what you have told it to do ;-) first run: rad = 0 cnt=0 rad=0+0 second run rad=0 cnt=1 rad=1+0 third run rad=1 cnt=2 rad=1+2 fourth run rad=3 cnt=3 rad=3+3 fifth run rad=6 cnt=4 rad=6+4 etc.
It's perfect,I 've got it _$ (setq cnt 1) (setq rad 0) (setq n 200) (repeat n (cond ((and (>= cnt rad)(< cnt rad)))) (setq rad (+ 1 rad)) ; this problem here (princ "\n")(princ "(setq rad")(princ " ") (princ rad)(princ ")") (setq cnt (1+ cnt)) ) 1 0 200 (setq rad 1) (setq rad 2) (setq rad 3) (setq rad 4) (setq rad 5) (setq rad 6) (setq rad 7) ;----------------------(snip)