Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Protected Symbol T

6 REPLIES 6
Reply
Message 1 of 7
d_r_wright
211 Views, 6 Replies

Protected Symbol T

Hello,

I understand the the SYMBOL T is a protected and perhaps sacred symbol in AutoCad.

Searching under HELP in AutoCad lets me know that the SYMBOL T is one of the protected symbols but not why or what it is used for.

Pi is another protected symbol, which I can understand. Anyone have any more information about the SYMBOL T, such as where it is used in AutoCad... does it stand for TAU or TEMPERATURE or Tony or what?

Thanks,
Doug
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: d_r_wright

T is the opposite of NIL. I guess it's the LISP equivalent of True.

--
"That's no ordinary rabbit."
http://www.acadx.com


"d_r_wright" wrote in message
news:f0872ae.-1@WebX.maYIadrTaRb...
Hello,
I understand the the SYMBOL T is a protected and perhaps sacred symbol
in AutoCad.
Searching under HELP in AutoCad lets me know that the SYMBOL T is one
of the protected symbols but not why or what it is used for.
Pi is another protected symbol, which I can understand. Anyone have
any more information about the SYMBOL T, such as where it is used in
AutoCad... does it stand for TAU or TEMPERATURE or Tony or what?
Thanks,
Doug
Message 3 of 7
Anonymous
in reply to: d_r_wright

It stands for TRUE and is very much an integral part of AutoLISP

(cond ((= 1 2) (dumb))
(T (smart)))

(T .... ) always returns a true value.


-David





"d_r_wright" wrote in message
news:f0872ae.-1@WebX.maYIadrTaRb...
> Hello,
> I understand the the SYMBOL T is a protected and perhaps sacred symbol in
AutoCad.
>
> Searching under HELP in AutoCad lets me know that the SYMBOL T is one of
the protected symbols but not why or what it is used for.
>
> Pi is another protected symbol, which I can understand. Anyone have any
more information about the SYMBOL T, such as where it is used in AutoCad...
does it stand for TAU or TEMPERATURE or Tony or what?
>
> Thanks,
> Doug
>
>
Message 4 of 7
Anonymous
in reply to: d_r_wright

T, in AutoLISP can be thought of as a symbol set to itself.

Native T...

Command: !T
T
Command: (eval T)
T
Command: (type t)
SYM
Command: (type (eval T))
SYM

Create T...

Command: (set 'T 'T)
T
Command: (eval T)
T
Command: (type T)
SYM
Command: (type (eval T))
SYM

Create myT...

Command: (set 'myT 'myT)
MYT
Command: (eval myT)
MYT
Command: (type myT)
SYM
Command: (type (eval myT))
SYM

--
Cliff

"d_r_wright" wrote in message
news:f0872ae.-1@WebX.maYIadrTaRb...
| Hello,
| I understand the the SYMBOL T is a protected and perhaps sacred symbol in
AutoCad.
|
| Searching under HELP in AutoCad lets me know that the SYMBOL T is one of
the protected symbols but not why or what it is used for.
|
| Pi is another protected symbol, which I can understand. Anyone have any
more information about the SYMBOL T, such as where it is used in AutoCad...
does it stand for TAU or TEMPERATURE or Tony or what?
|
| Thanks,
| Doug
|
|
Message 5 of 7
d_r_wright
in reply to: d_r_wright

Thanks for the replies. I got it now.

Doug
Message 6 of 7
Anonymous
in reply to: d_r_wright

A2K2:

Command: (type T)
SYM

Command: (setq t nil)
nil

Command: !t
nil

Command: (type t)
nil

Command: (eval t)
nil

Command: (setq t 't)
T

Command: (eval t)
T

Command: (type t)
SYM

I thought VLISP was supposed to prevent mucking with "protected" symbols?

?
Message 7 of 7
Anonymous
in reply to: d_r_wright

You can do it but the interpreter will interrupt your program to tell you
that an assignment has been made to a protected symbol and allow you to
break out or continue. A little protection from bad programming.
--
Cliff

"Herman Mayfarth" wrote in message
news:VA.000000e6.03f40e23@tktn.com...
| A2K2:
|
| Command: (type T)
| SYM
|
| Command: (setq t nil)
| nil
|
| Command: !t
| nil
|
| Command: (type t)
| nil
|
| Command: (eval t)
| nil
|
| Command: (setq t 't)
| T
|
| Command: (eval t)
| T
|
| Command: (type t)
| SYM
|
| I thought VLISP was supposed to prevent mucking with "protected" symbols?
|
| ?
|

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost