dbroada Posted May 7, 2013 Posted May 7, 2013 What is the difference between 'symbol and "myName" when used in LISP routines?I always use the quoted version but I see the 'version more often used in samples. Are they interchangable? Quote
Lee Mac Posted May 7, 2013 Posted May 7, 2013 Some AutoLISP functions, (such as setvar / getvar / vlax-get / vlax-get-property / vlax-put / vlax-put-property / vlax-invoke / vlax-invoke-method), will accept both a quoted symbol or a string; in general, a quoted symbol and string are two different data types. _$ (type 'symbol) SYM _$ (type "symbol") STR Quote
dbroada Posted May 7, 2013 Author Posted May 7, 2013 so if you are referencing an inbuilt variable you should be using 'symbol although it will work as "symbol". Quote
Lee Mac Posted May 7, 2013 Posted May 7, 2013 so if you are referencing an inbuilt variable you should be using 'symbol although it will work as "symbol". It makes no difference whichever is used, both are 'correct' (getvar 'cmdecho) (getvar "cmdecho") I tend to use a quoted symbol as a personal preference (and because its easier to type). Quote
dbroada Posted May 7, 2013 Author Posted May 7, 2013 I'll continue with the "quote marks" then as its an old habbit. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.