Code Red => AutoLISP (Vanilla / Visual) => Topic started by: RAIN CODE on May 08, 2012, 06:36:49 AM
Title: how to replace at item in a list
Post by: RAIN CODE on May 08, 2012, 06:36:49 AM
Hi,
I have a problem here hope someone can help. Example a list - (list 1 2 2 3 3 1 5 4 9 3) and I want to replace the 2nd item of the list with 6. results (list 1 6 2 3 3 1 5 4 9 3) Is there any preset Lisp function that can replace an item in a list. I used subst but it replace others too which I wanted it unchange. I have written a lisp for it but the lisp is long and slow down the game when the main program call this subroutine Lisp too often.
Thanks
Title: Re: how to replace at item in a list
Post by: Lee Mac on May 08, 2012, 06:44:03 AM