(type item)
Determine the type (for example, file, integer, string, and so forth) of an item.
This function returns the type (such as real number, integer, list, entity name, and so forth) of the item. The following table lists the various types and their meanings.
Types | Meaning |
---|---|
ENAME | Entity name. |
EXSUBR | External subroutines: SDS functions. |
FILE | File descriptor. |
INT | Integer number. |
LIST | List and user-defined function. |
PAGETB | Function paging table. |
PICKSET | Selection set. |
REAL | Real number. |
STR | String. |
SUBR | Subroutines: LISP functions. |
SYM | Symbol. |
Examples
Code | Returns |
---|---|
(type 2) | INT |
(type 2.0) | REAL |
(type '(5 6 7)) | LIST |
(type "Street") | STR |
(type setq) | SUBR |
(setq x (open "C:\\my.fil" "w")) | |
(type x) | FILE |
(type 'x) | SYM |
(setq entinfo (entsel)) (type entinfo) ENAME |
Could Return: <Entity name: 208055> |
(setq ourset (ssget)) | <Selection set: 2> |
(type ourset) | PICKSET |
Tell me about...
(setq symbol1 statement1 [symbol2 statement2] ...)