Questo contenuto non è disponibile nella lingua selezionata.
2.2.3. Comments and Documentation
All probes and functions should include comment blocks that describe their purpose, the data they provide, and the context in which they run (e.g. interrupt, process, etc). Use comments in areas where your intent may not be clear from reading the code.
Note that specially-formatted comments are automatically extracted from most tapsets and included in this guide. This helps ensure that tapset contributors can write their tapset and document it in the same place. The specified format for documenting tapsets is as follows:
For example:
To override the automatically-generated
Synopsis
content, use:
* Synopsis: * New Synopsis string *
* Synopsis:
* New Synopsis string
*
For example:
It is recommended that you use the
<programlisting>
tag in this instance, since overriding the Synopsis
content of an entry does not automatically form the necessary tags.
For the purposes of improving the DocBook XML output of your comments, you can also use the following XML tags in your comments:
command
emphasis
programlisting
remark
(tagged strings will appear in Publican beta builds of the document)