Every List is Evaluated in the Same Specific Manner in Autolisp

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:

See also  Storing and Setting AutoCAD’s System Variables with Autolisp
Tags

Related Articles

Back to top button
Close
SUBSCRIBE TO OUR NEWSLETTER

It's FREE!

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