strcar doesn't work?

strcar doesn't work?

Anonymous
Not applicable
906 Views
3 Replies
Message 1 of 4

strcar doesn't work?

Anonymous
Not applicable

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

 

0 Likes
Accepted solutions (1)
907 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Accepted solution

"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
Not applicable

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

0 Likes
Message 4 of 4

Anonymous
Not applicable

You are welcome.

0 Likes