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

strcar doesn't work?

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Anonymous
788 Views, 3 Replies

strcar doesn't work?

Dear All,

 

I am new in Lisp can you help find my problem please?

 

numlst is a group of number

 

(setq dcm (getstring "\nDCM Name: "))
(setq minn (apply 'min numlst)) <<<<< I believe this line has something wrong
(princ (strcat dcm "," minn))

error :bad argument type: symbolp nil

 

Many Thanks,

Bruce

 

3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

"strcat" is working only for strings.

you need to convert the number to string.

 

 

refer "rtos" function.

 

(setq dcm (getstring "\nDCM Name: "))
(setq numlst '(1 2 3 4))
(setq minn (apply 'min numlst))
(princ (strcat dcm "," (rtos minn 2 0)))
Message 3 of 4
Anonymous
in reply to: Anonymous

Thank you so much. Thank you for your quick reply, you saved my life. >_^

Message 4 of 4
Anonymous
in reply to: Anonymous

You are welcome.

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

Post to forums  

Forma Design Contest


Autodesk Design & Make Report