Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to cancel the return value of the REPEAT command

1 REPLY 1
Reply
Message 1 of 2
Karol-Or
300 Views, 1 Reply

How to cancel the return value of the REPEAT command

I use the Repeat command with an index, and when it exits, it writes the last index.

I cannot move it to a new line,nor cancel it.

If i insert a (princ "\n") inside the loop it moves it to a new line, but also all  the outputs of the loop get extra line spaces

1 REPLY 1
Message 2 of 2
Moshe-A
in reply to: Karol-Or

Karol,

 

1. (repeat) is a function not a command.

 

2. (repeat) returns the value of the last expression or atom evaluated

 

3. put (princ) [with out any arguments] after (repeat) for quiet exit to cmd line

 

 

(setq i 0)

(repeat 15

   .....                        ; your code here

   .....

   .....

  (setq i (1+ i))

)

 

(princ)

 

 

moshe

 

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost