Info Node: (texinfo)Optional Arguments

texinfo: Optional Arguments
Definition Commands
@deffnx
Def Cmd Continuation Lines
Back to Software Index
16.3 Optional and Repeated Arguments
====================================
Some entities take optional or repeated arguments, conventionally
specified by using square brackets and ellipses: an argument enclosed
within square brackets is optional, and an argument followed by an
ellipsis is optional and may be repeated more than once.
Thus, [OPTIONAL-ARG] means that OPTIONAL-ARG is optional and
REPEATED-ARGS'...' stands for zero or more arguments. Parentheses are
used when several arguments are grouped into additional levels of list
structure in Lisp.
Here is the '@defspec' line of an example of an imaginary
(complicated) special form:
-- Special Form: foobar (VAR [FROM TO [INC]]) BODY...
In this example, the arguments FROM and TO are optional, but must both
be present or both absent. If they are present, INC may optionally be
specified as well. These arguments are grouped with the argument VAR
into a list, to distinguish them from BODY, which includes all remaining
elements of the form.
In a Texinfo source file, this '@defspec' line is written like this,
including a continuation to avoid a long source line.
@defspec foobar (@var{var} [@var{from} @var{to} @
[@var{inc}]]) @var{body}@dots{}
The function is listed in the Command and Variable Index under 'foobar'.
automatically generated by info2www version 1.2