calling LISP commands within the setq funtion in R14

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?
Reply to
John McCullough
Loading thread data ...
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.
Reply to
TomD
Thanks for the input. It worked like a charm.
Reply to
John McCullough

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.