Reference. Reference for the DocBook DTD

[Prev] [Next]


FuncSynopsis

Name

FuncSynopsis---Synopsis of a Function

Synopsis

Content Model
  FuncSynopsisInfo?,
  (FuncPrototype+ | (FuncDef, (Void | VarArgs
  | ParamDef+))+)
  ,
  FuncSynopsisInfo?

Attributes

This element has common and Role attributes.

Name Value(s) Type Default Value
Label CDATA #IMPLIED  

Tag Minimization

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

Description

Synopsis of a Function that shows a prototype or definition indicating a function's name. A FuncSynopsis also indicates the data type of its return value, and the positions, purposes, and data types of its parameters. A FuncSynopsis begins with an optional FuncSynopsisInfo, which contains additional information about the synopsis that follows; line breaks and leading white space are significant within a FuncSynopsisInfo. This is followed by one or more blocks defining a function (you might use more than one for connecting related sets of functions). Each of these blocks consists of a required FuncDef, followed by a Void, a VarArgs, or one or more ParamDefs. Void, Varargs, and and ParamDef are mutually exclusive. A FuncSynopsisInfo may optionally follow these blocks.

Usage

You should supply no specific information on the arguments before the ellipsis that VarArgs should output when rendered, but if it is necessary to represent the ellipsis in the source it may ben enclosed within a final ParamDef. FuncSynopsis has common and Label attributes.

Processing Expectations

The processing application is expected to provide all parentheses, semicolons, and the like. The exceptions are any spaces surrounding function and parameter names, any parentheses or commas or spacing inside lists of data types of parameters that are pointers to functions, and the parentheses around those parameter names themselves. These exceptions are a bit confusing in the unusual case (pointers to functions), but they greatly simplify tagging and still allow either K&R style or ANSI C style to be produced (assuming writers have cooperated in supplying enough information for ANSI).

Parents

These elements contain FuncSynopsis: Appendix, Application, Article, Attribution, BiblioDiv, BiblioMisc, Bibliography, BlockQuote, Callout, Caution, Chapter, Citation, CiteTitle, Comment, Emphasis, Example, Figure, Footnote, ForeignPhrase, GlossDef, GlossDiv, GlossSee, GlossSeeAlso, GlossTerm, Glossary, Important, Index, IndexDiv, InformalExample, LineAnnotation, Link, ListItem, LiteralLayout, LoTentry, Member, MsgAud, MsgExplan, MsgText, Note, OLink, Para, PartIntro, Phrase, Preface, Procedure, ProductName, ProgramListing, Quote, RefEntryTitle, RefSect1, RefSect2, RefSect3, RefSynopsisDiv, Screen, ScreenInfo, Sect1, Sect2, Sect3, Sect4, Sect5, Seg, SetIndex, Sidebar, SimPara, SimpleSect, Step, Synopsis, Term, Tip, ToCback, ToCentry, ToCfront, ULink, Warning, and entry.

Children

FuncSynopsis contains these elements: FuncDef, FuncPrototype, FuncSynopsisInfo, ParamDef, VarArgs, and Void.

In some contexts, additional elements may be allowed by inclusions in parent elements. Similarly, in some contexts, some of these elements may be invalid due to exclusions in parent elements.

Attributes

Label

Label holds an identifying number or string to be output in some manner when the element it is applied to is rendered.

Examples

<FUNCSYNOPSIS>
<FUNCSYNOPSISINFO>#include &lt;stdlib.h></FUNCSYNOPSISINFO>
<FUNCDEF>double <FUNCTION>atof</FUNCTION></FUNCDEF>
<PARAMDEF>const char *<PARAMETER>nptr</PARAMETER></PARAMDEF>
</FUNCSYNOPSIS>
<FUNCSYNOPSIS>
<FUNCSYNOPSISINFO>TODO TBS
</FUNCSYNOPSISINFO>
<FUNCPROTOTYPE>
<FUNCDEF>TODO TBS
</FUNCDEF>
<VOID>
</FUNCPROTOTYPE>
</FUNCSYNOPSIS>


[Prev] FuncSynopsisInfo
[Next] Function
[Reference Home] [Davenport Group Home]