funcparams
funcparams — Parameters for a function referenced through a function pointer in a synopsis.
Synopsis
funcparams ::=
- Zero or more of:
- text
replaceable
- 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.
No additional attributes.
Description
In some programming languages (such as C), it is possible for a
function to have a pointer to another function as one of its parameters.
In the syntax summary for such a function, the
funcparams
element provides a wrapper for the
function pointer.
For example, the following prototype describes the function
sort
, which takes two parameters. The first
parameter, arr
, is an array of integers. The
second parameter is a pointer to a function, comp
,
that returns an int
. The comp
function
takes two parameters, both of type int *
:
|<funcprototype>
|<funcdef>void <function>sort</function></funcdef>
|<paramdef>int *<parameter>arr</parameter>[]</paramdef>
|<paramdef>int <parameter>(* comp)</parameter>
|<funcparams>int *, int *</funcparams></paramdef>
|</funcprototype>
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
Parents
These elements contain funcparams
: methodparam
, paramdef
.
Children
The following elements occur in funcparams
: text, 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
, replaceable
, subscript
, superscript
, trademark
, wordasword
, xref
.
See Also
Related elements: funcdef
, funcprototype
, funcsynopsisinfo
, function
, paramdef
, parameter
, returnvalue
, varargs
, void
.
Examples
1 |<article xmlns='http://docbook.org/ns/docbook'>
|<title>Example funcparams</title>
||
<funcsynopsis>
5 |<funcprototype>
|<funcdef>void <function>qsort</function></funcdef>
|<paramdef>void *<parameter>dataptr</parameter>[]</paramdef>
|<paramdef>int <parameter>left</parameter></paramdef>
|<paramdef>int <parameter>right</parameter></paramdef>
10 |<paramdef>int (*<parameter>comp</parameter>)
|<funcparams>void *, void *</funcparams></paramdef>
|</funcprototype>
|</funcsynopsis>
|15 |
</article>
void qsort( | dataptr, |
left, | |
right, | |
comp); |
void * | dataptr[] |
int | left |
int | right |
int (*comp) | (void *, void *) |