Defines a function
(defun sym ([arguments] [/ variables...]) expr...)
Arguments
A symbol naming the function.
The names of arguments expected by the function.
The names of one or more local variables for the function.
The slash preceding the variable names must be separated from the first local name and from the last argument, if any, by at least one space.
Any number of AutoLISP expressions to be evaluated when the function executes.
If you do not declare any arguments or local symbols, you must supply an empty set of parentheses after the function name.
If duplicate argument or symbol names are specified, AutoLISP uses the first occurrence of each name and ignores the following occurrences.
Return Values
The result of the last expression evaluated.
Examples
(defun myfunc (x y) ...) Function takes two arguments
(defun myfunc (/ a b) ...) Function has two local variables
(defun myfunc (x / temp) ...) One argument, one local variable
(defun myfunc () ...) No arguments or local variables
Symbol and Function Handling topic in the AutoLISP Developer's Guide.
The