paramdef
paramdef — Information about a function parameter in a programming language.
Synopsis
paramdef ::=
- Zero or more of:
- text
funcparams
initializer
modifier
parameter
replaceable
templatename
type
- Graphic inlines
- Indexing inlines
- Linking inlines
- Ubiquitous inlines
abbrev
acronym
alt
anchor
annotation
biblioref
coref
date
emphasis
(db._emphasis)firstterm
(db._firstterm)footnote
footnoteref
foreignphrase
(db._foreignphrase)glossterm
(db._glossterm)indexterm
(db.indexterm.endofrange)indexterm
(db.indexterm.singular)indexterm
(db.indexterm.startofrange)inlinemediaobject
link
olink
phrase
(db._phrase)quote
(db._quote)remark
subscript
superscript
trademark
wordasword
xref
Attributes
Common attributes and common linking attributes.
Additional attributes:
- choice (enumeration) [default=“opt”]
- “opt”
- “req”
Description
In the syntax summary for a function in a programming language,
paramdef
provides the description of a parameter to
the function. Typically, this includes the data type of the parameter
and its name. For parameters that are pointers to functions, it also
includes a summary of the nested parameters.
Within the paramdef
, the parameter name is
identified with parameter
, and the rest of the
content is assumed to be the data type.
In the following definition, str
is the
name of the parameter and char *
is its type:
|<paramdef>char *<parameter>str</parameter></paramdef>
Sometimes a data type requires punctuation on both sides of the
parameter. For example, the a
parameter in this
definition is an array of char *
:
|<paramdef>char *<parameter>a</parameter>[]</paramdef>
Processing expectations
Formatted inline. For a complete description of the processing
expectations, see funcsynopsis
.
Attributes
Common attributes and common linking attributes.
- any attribute
Any attribute in any other explicit namespace
- choice
Indicates optionality.
Enumerated values: “opt” Formatted to indicate that it is optional.
“req” Formatted to indicate that it is required.
Parents
These elements contain paramdef
: funcprototype
, group
(db.group.paramdef), macroprototype
.
Children
The following elements occur in paramdef
: text, abbrev
, acronym
, alt
, anchor
, annotation
, biblioref
, coref
, date
, emphasis
(db._emphasis), firstterm
(db._firstterm), footnote
, footnoteref
, foreignphrase
(db._foreignphrase), funcparams
, glossterm
(db._glossterm), indexterm
(db.indexterm.endofrange), indexterm
(db.indexterm.singular), indexterm
(db.indexterm.startofrange), initializer
, inlinemediaobject
, link
, modifier
, olink
, parameter
, phrase
(db._phrase), quote
(db._quote), remark
, replaceable
, subscript
, superscript
, templatename
, trademark
, type
, wordasword
, xref
.
See Also
Related elements: funcdef
, funcparams
, funcprototype
, funcsynopsisinfo
, function
, parameter
, returnvalue
, varargs
, void
.
Examples
1 |<article xmlns='http://docbook.org/ns/docbook'>
|<title>Example paramdef</title>
||
<funcsynopsis>
5 |<funcprototype>
|<funcdef>int <function>max</function></funcdef>
|<paramdef>int <parameter>int1</parameter></paramdef>
|<paramdef>int <parameter>int2</parameter></paramdef>
|</funcprototype>
10 |</funcsynopsis>
||
</article>