funcparams — Parameters for a function referenced through a function pointer in a synopsis


Content Model

funcparams ::=


In some programming languages (like 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 *:

  <funcdef>void <function>sort</function></funcdef>
    <paramdef>int *<parameter>arr</parameter>[]</paramdef>
    <paramdef>int <parameter>(* comp)</parameter>
      <funcparams>int *, int *</funcparams></paramdef>

Processing expectations

Formatted inline. For a complete description of the processing expecations, see FuncSynopsis.


These elements contain funcparams: methodparam, paramdef.


The following elements occur in funcparams: text, alt, anchor, annotation, biblioref, indexterm (db.indexterm.endofrange), indexterm (db.indexterm.singular), indexterm (db.indexterm.startofrange), inlinemediaobject, link, olink, phrase (db._phrase), remark, replaceable, subscript, superscript, xref.

See Also

funcdef, funcprototype, funcsynopsisinfo, function, paramdef, parameter, returnvalue, varargs, void


<article xmlns=''>
<title>Example funcparams</title>

  <funcdef>void <function>qsort</function></funcdef>
    <paramdef>void *<parameter>dataptr</parameter>[]</paramdef>
    <paramdef>int <parameter>left</parameter></paramdef>
    <paramdef>int <parameter>right</parameter></paramdef>
    <paramdef>int (*<parameter>comp</parameter>)
      <funcparams>void *, void *</funcparams></paramdef>

void qsort(dataptr,  
void * dataptr[];
int  left;
int  right;
int (*comp) (void *, void *);


This alpha reference page is $Revision: 1.4 $ published $Date: 2005/10/31 12:31:54 $.