Name
funcsynopsis — The syntax summary for a function definition
Synopsis
funcsynopsis ::=
(info? db.titleforbidden.info,
(funcprototype |
funcsynopsisinfo)+)
Description
A funcsynopsis contains the syntax summary of a
function prototype or a set of function prototypes. The content model of
this element was designed specifically to capture the semantics of most
C-language function prototypes (for use in UNIX
reference pages).
This is one of the few places where DocBook attempts to model as
well as describe. Using funcsynopsis for languages
that are unrelated to C may prove difficult.
Processing expectations
For the most part, the processing application is expected to generate all of the parentheses, semicolons, commas, and so on required in the rendered synopsis. The exception to this rule is that the spacing and other punctuation inside a parameter that is a pointer to a function must be provided in the source markup.
With sufficient author cooperation, it should be possible to mark up a function synopsis with enough clarity so that a processing system can generate either K&R-style or ANSI-style renderings.
Attributes
Common attributes and common linking attributes.
- language
Identifies the language (i.e., programming language) of the content
See Also
cmdsynopsis, synopsis
Examples
There are two common presentation styles for function synopses, “K&R” style and “ANSI” style.
K&R examples
<article xmlns='http://docbook.org/ns/docbook'> ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access