funcparams
funcparams — Parameters for a function referenced through a function pointer in a synopsis
Synopsis
Mixed Content Model
funcparams ::=
(#PCDATA|link|olink|ulink|action|application|classname|methodname|
interfacename|exceptionname|ooclass|oointerface|ooexception|
package|command|computeroutput|database|email|envar|errorcode|
errorname|errortype|errortext|filename|function|guibutton|
guiicon|guilabel|guimenu|guimenuitem|guisubmenu|hardware|
interface|keycap|keycode|keycombo|keysym|literal|code|constant|
markup|medialabel|menuchoice|mousebutton|option|optional|
parameter|prompt|property|replaceable|returnvalue|sgmltag|
structfield|structname|symbol|systemitem|uri|token|type|
userinput|varname|nonterminal|anchor|remark|subscript|
superscript|inlinegraphic|inlinemediaobject|indexterm|beginpage)*
Attributes
Description
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 *:
<funcprototype>
<funcdef>void <function>sort</function></funcdef>
<paramdef>int *<parameter>arr</parameter>[]</paramdef>
<paramdef>int <parameter>(* comp)</parameter>
<funcparams>int *, int *</funcparams></paramdef>
</funcprototype>