Jump to content

Cond.. code is not working


bijoyvm

Recommended Posts

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)

)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

 

Glad to be of service. :)

 

BUT you still need to ADD CODE TAGS ---> Code Posting Guidelines

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...