Jump to content

Verify if INT, STR, REAL or whatever


svorgodne

Recommended Posts

I need to find out what kind of values some symbols are having.

 

There fore I know I can do the opposite. I need to verify if the symbol is something that I need to process.

 

Example

 

(setq example "Test")
(type Test)
STR

But what I would need to verify is something like this

 

(if
(= Test STR) ;this test is not working and this is the main question, hhow to verify this
("do this")
)

Of course this is not working and that is the reason I am asking. I need for different kind of symbols like I wrote before.

 

Thanks in advance

Sergio

Edited by svorgodne
make it clearer
Link to comment
Share on other sites

What does the apostrophe stand for?

 

Please refer to my tutorial: The Apostrophe and the Quote Function

 

The apostrophe ensures that the quoted characters are not evaluated and therefore passed to the type function as a symbol; however, as per my tutorial, note that the apostrophe/single-quote is used to declare any AutoLISP data as a literal, and is not limited to symbols.

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...