Is there a way to call a LISP command within the the setq or set functions such that (setq x 1 y 2 z 3) (setq pt1 ((+ x y) z) will evaluate the exressions and return "3 3" instead of returning "(+ x y) z" as the value of the string?
calling LISP commands within the setq funtion in R14
Oct 01, 2003
2 Replies
I'm not exactly sure what you're trying accomplish, when say "return '3
3'". In your example, you have a function (albeit with bad syntax) within the setq.(setq pt1 (+ x y z)) would return the sum of x, y and z.
If you're trying to create a coordinate point from the values, you need to make them a list, like this:
(setq pt1 (list x y z))
That could be passed to any function/command requiring a point.
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required