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



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.


These elements contain funcparams: methodparam, paramdef.

Children [+]

This element contains 16 elements.


  1 <article xmlns=''>
  2 <title>Example funcparams</title>
  4 <funcsynopsis>
  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>
void qsort(dataptr,  
void * dataptr[];
int  left;
int  right;
int (*comp) (void *, void *);
Last revised by Norman Walsh on 6 Jun 2011 (git hash: 6ffcc7640bbc5f852a318e452c9f210f03292cb9)