Ok, so I was wrong, I dont understand the nil test.
This code:
Code:
(defun C:UCSCOPY ()
(setq table (tblnext "ucs" t))
(print table)
(prompt "\nFirst")
(while table
(setq table (tblnext "ucs"))
(print table)
(prompt "\nAgain")
)
(prompt "\nEnd")
(princ)
)
(prompts are for tracking purposes)
returns this:
Command: ucscopy
((0 . "UCS") (2 . "Test 1") (70 . 0) (10 9.94824 6.66425 0.0) (11 0.901829
0.432093 0.0) (12 -0.432093 0.901829 0.0) (79 . 0) (146 . 0.0))
First
((0 . "UCS") (2 . "Test 2") (70 . 0) (10 30.8981 -5.72374 0.0) (11 0.809488
-0.587137 0.0) (12 0.587137 0.809488 0.0) (79 . 0) (146 . 0.0))
Again
((0 . "UCS") (2 . "Test 3") (70 . 0) (10 54.7626 34.9228 0.0) (11 0.223615
0.974678 0.0) (12 -0.974678 0.223615 0.0) (79 . 0) (146 . 0.0))
Again
((0 . "UCS") (2 . "Test 4") (70 . 0) (10 81.6946 16.0317 0.0) (11 0.95056
0.310541 0.0) (12 -0.310541 0.95056 0.0) (79 . 0) (146 . 0.0))
Again
nil
Again
End
Command:
Why does it go thru the entire While funciton AFTER it becomes nil?
[ Moderator Action = ON ] What are [ CODE ] tags... [ Moderator Action = OFF ]