Dynamic functions
Posted: Fri Jun 17, 2005 3:15 pm
(set 'a "myprogram -abc -use=something example.txt")
(set 'b (parse a))
b => ("myprogram" "-abc" "-use=something" "example.txt")
Now I need a way to execute this as a newlisp function. Something along the lines of:
(eval ((nth 0 b) (nth 1 b) (nth 2 b) (nth 3 b)))
I need newlips to try to turn all that into (myprogram -abc -use=something example.txt), or in other words, I need it to take my string and turn it into a newlisp function.
Any ideas?
(set 'b (parse a))
b => ("myprogram" "-abc" "-use=something" "example.txt")
Now I need a way to execute this as a newlisp function. Something along the lines of:
(eval ((nth 0 b) (nth 1 b) (nth 2 b) (nth 3 b)))
I need newlips to try to turn all that into (myprogram -abc -use=something example.txt), or in other words, I need it to take my string and turn it into a newlisp function.
Any ideas?