FuncParams

Name

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|Command|
  ComputerOutput|Database|Email|EnVar|ErrorCode|ErrorName|
  ErrorType|Filename|Function|GUIButton|GUIIcon|GUILabel|GUIMenu|
  GUIMenuItem|GUISubmenu|Hardware|Interface|InterfaceDefinition|
  KeyCap|KeyCode|KeyCombo|KeySym|Literal|Constant|Markup|
  MediaLabel|MenuChoice|MouseButton|MsgText|Option|Optional|
  Parameter|Prompt|Property|Replaceable|ReturnValue|SGMLTag|
  StructField|StructName|Symbol|SystemItem|Token|Type|UserInput|
  VarName|Anchor|Comment|Subscript|Superscript|InlineGraphic|
  InlineMediaObject|IndexTerm)*)

Attributes

Common attributes

Tag Minimization

Both the start- and end-tags are required for this element.

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>

Processing expectations

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

(4.0) Future Changes

The InterfaceDefinition element will be discarded in DocBook V4.0. It will no longer be available in the content model of this element.

Parents

These elements contain FuncParams: ParamDef.

Children

The following elements occur in FuncParams: Action, Anchor, Application, ClassName, Command, Comment, ComputerOutput, Constant, Database, Email, EnVar, ErrorCode, ErrorName, ErrorType, Filename, Function, GUIButton, GUIIcon, GUILabel, GUIMenu, GUIMenuItem, GUISubmenu, Hardware, IndexTerm, InlineGraphic, InlineMediaObject, Interface, InterfaceDefinition, KeyCap, KeyCode, KeyCombo, KeySym, Link, Literal, Markup, MediaLabel, MenuChoice, MouseButton, MsgText, OLink, Option, Optional, Parameter, Prompt, Property, Replaceable, ReturnValue, SGMLTag, StructField, StructName, Subscript, Superscript, Symbol, SystemItem, Token, Type, ULink, UserInput, VarName.

In some contexts, the following elements are allowed anywhere: BeginPage, IndexTerm.

In some contexts, the following elements are excluded: IndexTerm.

See Also

FuncDef, FuncPrototype, FuncSynopsisInfo, Function, ParamDef, Parameter, ReturnValue, VarArgs, Void

Examples

<!DOCTYPE funcsynopsis PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
<funcsynopsis>
<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>
    <paramdef>int <parameter>(* comp)</parameter>
      <funcparams>void *, void *</funcparams></paramdef>
</funcprototype>
</funcsynopsis>

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

For additional examples, see also FuncSynopsis.

Copyright © 1999 O'Reilly & Associates, Inc. All rights reserved.


HIVE: All information for read only. Please respect copyright!
Hosted by hive КГБ: Киевская городская библиотека