funcparams
funcparams — Parameters for a function referenced through a function pointer in a synopsis.
Synopsis
- Zero or more of:
- text
phrase(db._phrase)replaceable- Graphic inlines
![[+]](figs/web/nav/right.gif)
- Indexing inlines
![[+]](figs/web/nav/right.gif)
- Linking inlines
![[+]](figs/web/nav/right.gif)
- Ubiquitous inlines
![[+]](figs/web/nav/right.gif)
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 *:
1 <funcprototype> 2 <funcdef>void <function>sort</function></funcdef> <paramdef>int *<parameter>arr</parameter>[]</paramdef> 4 <paramdef>int <parameter>(* comp)</parameter> <funcparams>int *, int *</funcparams></paramdef> 6 </funcprototype>
Processing expectations
Formatted inline. For a complete description of the processing
expectations, see funcsynopsis.
Parents
These elements contain funcparams: methodparam, paramdef.
See Also
funcdef, funcprototype, funcsynopsisinfo, function, paramdef, parameter, returnvalue, varargs, void
Examples
1 <article xmlns='http://docbook.org/ns/docbook'> 2 <title>Example funcparams</title> 4 <funcsynopsis> <funcprototype> 6 <funcdef>void <function>qsort</function></funcdef> <paramdef>void *<parameter>dataptr</parameter>[]</paramdef> 8 <paramdef>int <parameter>left</parameter></paramdef> <paramdef>int <parameter>right</parameter></paramdef> 10 <paramdef>int (*<parameter>comp</parameter>) <funcparams>void *, void *</funcparams></paramdef> 12 </funcprototype> </funcsynopsis> 14 </article>
void qsort( | dataptr, | |
| left, | ||
| right, | ||
comp); |
| void * | dataptr[]; |
| int | left; |
| int | right; |
int (*comp)
(void *, void *); | |




![[-]](figs/web/nav/down.gif)