Lesson 4 – Every List is Evaluated in the Same Specific Manner



AutoLISP assumes that a list is an expression that needs to be evaluated. The function must be the first element in a list and its arguments must immediately follow it. A generalized AutoLISP function would look this way:

  • AutoLISP evaluates the expression depending on the function definition and the explicit arguments that are designated.
  • Some functions have required arguments and some have both required and optional arguments. In this book we will designate optional arguments in brackets, [optional argument]. The brackets are not used in the actual routine.

Examples
We’ve already seen several examples of AutoLISP functions: the basic math functions. In generalized form, they would look like this:

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment moderation is enabled. Your comment may take some time to appear.

Show Buttons
Hide Buttons
SUBSCRIBE TO OUR NEWSLETTER

It's FREE!

Sign up and receive an email every time a new tutorial is published