Did you not read the other replies on your post a while back? --- > Convert Real to StringCode:(cond ((= (type a) 'STR) (alert "\nIT IS STRING")) ((= (type a) 'int) (alert "\nIT IS INTEGER")) )
BTW: ADD CODE TAGS ---> Code Posting Guidelines

Registered forum members do not see this ad.
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)
)
Did you not read the other replies on your post a while back? --- > Convert Real to StringCode:(cond ((= (type a) 'STR) (alert "\nIT IS STRING")) ((= (type a) 'int) (alert "\nIT IS INTEGER")) )
BTW: ADD CODE TAGS ---> Code Posting Guidelines

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
Registered forum members do not see this ad.
Glad to be of service.
BUT you still need to ADD CODE TAGS ---> Code Posting Guidelines <--- read this
Bookmarks