Arguments can be added to Lisp and OM functions. Indeed, for practical issues, function boxes don't always show all possible inlets. Additional arguments can be either optional or keyword arguments.
To know which types of arguments are accepted by a function :
select it
press d
to get the function documentation.
The arguments type, that is default, optional and key arguments – the prototype of the function – is indicated at teh beginning of the documentation.
Optional arguments are identified by the &optional prefix. The order of optional arguments cannot be modified.
Alt
+ →
or SHIFT
+ >
.Alt
+ ←
or <
. This function has one default argument, and two optional arguments, as shownat the beginning of the documentation :
"lst" is a single default argument that stands for "list". It has no prefix.
The &optional prefix referes to optional arguments.
In some cases, recent upgrades provides an
online reference documentation
instead of the internal documentation. This documentation is also accessed by pressing d
.
Keyword arguments are identified by the &key prefix and shown by dark blue inlets.
These arguments are not sorted, which is very convenient when a function has numerous additional arguments : a user might want to use the last of a twelve arguments list without having to display all the preceding arguments.
Select the box and type k
to add a keyword argument.
Type SHIFT
+ k
to remove it.
The name and value of a keyword argument must then be specified, as described in the following procedures.
![]() | Before it is defined by the user, its default name is the name of the first argument in the list. This name is visible by hovering the mouse over the box inlet. Note that keyword names are always preceded by "
To change the argument :
|
The list of available keyword arguments is displayed by a tooltip or in the documentation of the function.
Cmd
while hovering the mouse over the inlet.d
The value of a keyword argument is set like the value of a standard argument by connecting a box to the keyword input. This box can be
| ![]() |