defun
(defun name ( [ args ... [ / vars
... ] ) expr ... )
This function defines a user-defined Lisp
function command.
Arguments |
name name of Lisp function (if prefixed by C: then the
Lisp function is also a command) |
Return |
name if the function was successfully registered;
otherwise a Lisp error is triggered; |
Example |
(defun lenghOf ( lst / res )
(setq res (length lst))) returns the length of a
list |
Remarks |
if 'name' is prefixed by
C: then a command
is registered, which can be directly called at commandline, by
entering name; if args or vars are used, the / delimiter *MUST* be surrounded by at least 1 space to the left + right ! |
© Bricsys NV. All rights reserved. |