Reference topics in the documentation use a consistent convention to describe the proper syntax for an AutoLISP function.
The syntax used is as follows:
In this example, the foo function has one required argument, string of the string data type, and one or more optional arguments of numeric value for number. The number arguments can be of the integer or real data types. Frequently, the name of the argument indicates the expected data type. The examples in the following table show both valid and invalid calls to the foo function.
Valid and invalid function call examples |
|
---|---|
Valid calls |
Invalid calls |
(foo "catch") |
(foo 44 13) |
(foo "catch" 22) |
(foo "fi" "foe" 44 13) |
(foo "catch" 22 31) |
(foo) |