Is it possible to step/change a variable name by combining text and Numbers together by strcat or some other function?
I have been trying to get this to work with several renditions with no luck, can someone shed some light or is it just not possible.
Thanks for any help on this.
Example of what I am trying to accomplish.
(setq ss1 "1")
(setq ss2 "2")
(setq ss3 "3")
(setq ss4 "4")
(setq ss5 "5")
;;; 40 plus variables, users anserwers from dcl
;;; Depending on answer a certain command exacuted
;;;(setq test "2") ; for testing
(setq testn nil test nil tell nil)
(setq testn 1)
(repeat 5
(setq testn (itoa testn))
(setq test (strcat "ss" testn)) ; Roll thru the variables ss1, ss2, ss3 & etc.
(setq tell (If (= "2" test)
(princ "Yes") ; Assign Command to this line
)
)
(setq testn (atoi testn))
(setq testn (+ 1 testn))
)