Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Just a quick question

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
142 Views, 3 Replies

Just a quick question

Why doesn't this work? What else can I use instead of strcat? Is it the
quotes?

(setq (strcat "test" "1") 12)

Thanks,
Tom
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

(set (read(strcat "test" "1")) 12)
Message 3 of 4
Anonymous
in reply to: Anonymous

Cool thanks,
Tom
"Mark Propst" wrote in message
news:f0ff7f2.0@WebX.maYIadrTaRb...
> (set (read(strcat "test" "1")) 12)
>
>
Message 4 of 4
Anonymous
in reply to: Anonymous

Tom,

Perhaps not the correct answer:
(eval (read (strcat "(" "setq " "My" "Age" " " "37" ")")))
The above creates a var named MyAge and puts the value 37 in it.

In your case:
(eval (read (strcat "(" "setq " "test" "1" " " "12" ")")))
or (if strings are needed:
(eval (read (strcat "(" "setq " "test" "1" " " "\"12\"" ")")))

Alex

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost