


Certain characters terminate a symbol name or numeric constant, they are as follows:.Symbol names can contain any sequence of printable characters except the following:.There are some characters in AutoLISP, like any language, which cannot be used under certain circumstances. You should define your own error handler so the user doesn't have to see this and wonder what is going on. If an error occurs while running an AutoLISP program, the interpreter will return a trace of the function starting with the most recent function and continuing to the top of the program. All symbols should be set to nil upon ending a program or encountering an error. A symbol can contain a list or a function definition. A symbol in LISP however can be a whole lot more than just a value, as a normal variable would hold. Symbol: is what other programming languages call a variable, and from this point on when I refer to a variable I am really talking about a symbol. If the first item in the list is not a function you will receive an error message stating: "bad function." The remainder of the list is used as the parameters or arguments to the function. They are functions, symbols, and lists.įunction: is the first item in every list. There are three basic data types in AutoLISP. The interpreter then evaluates, as a list, what is between the opening "(" symbol and the closing ")" symbol. When AutoCAD sees the opening parentheses, it runs the AutoLISP interpreter. The AutoLISP environment is entered when AutoCAD receives a "(" symbol at the command line. AutoLISP Lesson #2 - THE AutoLISP ENVIRONMENT:
