Feeling very rusty and haven't done any "lisping" in a long time so be kind...
Part of a larger routine, I need the output to be in the following format: anything less than "10" should read 001, 002, 003, etc. and <=10 should read 010, 011, 012, etc.
Because of the need to have (setq cnt (1- cnt)) - dealing with a list of numbers in routine - the entry "10" sneaks by and becomes "0010" - think I am missing something simple here.
(defun c:test (/ )
(setq cnt (getint "\nEnter Starting Number: "))
(setq cnt (1- cnt))
(if (<= cnt 9)
(setq txt1 (strcat "00" (itoa (setq cnt (1+ cnt)))))
(setq txt1 (strcat "0" (itoa (setq cnt (1+ cnt)))))
)
(princ txt1)
(princ)
)
]
Won't be able to check back until tomorrow - thanks for any feedback.
Dan