Jump to content

Help to solve How to While function run in multiple values?


maahee

Recommended Posts

(defun c:BM ()

(setq divdist (getint "\nEnter number: "))



(setq m 1)

(setq n 1)

(setq i 1)



  (if (= (rem divdist 2) 0)

    (progn

      (setq e (/ (+ divdist 1) 2))       

      (setq o (- (+ divdist 1) e))   

    )

    (progn

      (setq e (/ divdist 2))

      (setq o (- (- divdist 1) e)) 

    )

  )



(while 

       (and 

              (< m e) 

              (< n o)  

              (< i divdist))



(setq stpti (polar p1 (angle p1 p2) (* (- (* m 2) 1) inc))) ;; 



(setq stpti-f (polar p1 (angle p1 p2) (+ (* (- (* m 2) 1) inc) 0.025))) ;;Calculate the forward point



(setq fwpti (polar p1 (angle p1 p2) (* (* n 2) inc))) ;; 



(setq fwpti-f (polar p1 (angle p1 p2) (+ (* (* n 2) inc) 0.025))) ;;Calculate the forward poin



(setq vertptfi-b (polar p1 (angle p1 p2) (* (* i 3) inc))) 



(setq fwpt2-b (polar p1 (angle p1 p2) (- (* (+ (* i 3) 1) inc) 0.025))) ;;Calculate the back point



(setq m (+ m 1))

(setq n (+ n 1))

(setq i (+ i 1))



) ; while loop end

)

While function run in multiple values 

Edited by maahee
Link to comment
Share on other sites

  • maahee changed the title to Help to solve How to While function run in multiple values?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...