bijoyvm Posted May 27, 2012 Share Posted May 27, 2012 hi friends please help me to correct this code... ;;;;;;; if a is integer (defun C:test() (setq a 01) (cond ((= (type a) STR) (alert "\nIT IS STRING")) ((= (type a) int) (alert "\nIT IS INTEGER")) ) (princ) ) ;;;;;;;;;; if a is string (defun C:test() (setq a "PLOT-01") (cond ((= (type a) STR) (alert "\nIT IS STRING")) ((= (type a) int) (alert "\nIT IS INTEGER")) ) (princ) ) Quote Link to comment Share on other sites More sharing options...
pBe Posted May 27, 2012 Share Posted May 27, 2012 (cond ((= (type a) 'STR) (alert "\nIT IS STRING")) ((= (type a) 'int) (alert "\nIT IS INTEGER")) ) Did you not read the other replies on your post a while back? --- > Convert Real to String BTW: ADD CODE TAGS ---> Code Posting Guidelines Quote Link to comment Share on other sites More sharing options...
bijoyvm Posted May 27, 2012 Author Share Posted May 27, 2012 thank you so much pBe yes i read that .. actually I 'm trying to create a lisp and i need to add this condition but it was not working.. no its working perfectly. thanks and regards bijoy Quote Link to comment Share on other sites More sharing options...
pBe Posted May 27, 2012 Share Posted May 27, 2012 thank you so much pBeyes i read that .. actually I 'm trying to create a lisp and i need to add this condition but it was not working.. no its working perfectly. thanks and regards bijoy Glad to be of service. BUT you still need to ADD CODE TAGS ---> Code Posting Guidelines Quote Link to comment Share on other sites More sharing options...
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.