Documentation: Difference between revisions
Content added Content deleted
(Updated D entry) |
|||
Line 136: | Line 136: | ||
D compiler comes with a builtin documentation system called [http://digitalmars.com/d/1.0/ddoc.html Ddoc]. Alternative systems may be used (a common alternative is [http://www.stack.nl/~dimitri/doxygen/ Doxygen] which includes some D support). |
D compiler comes with a builtin documentation system called [http://digitalmars.com/d/1.0/ddoc.html Ddoc]. Alternative systems may be used (a common alternative is [http://www.stack.nl/~dimitri/doxygen/ Doxygen] which includes some D support). |
||
<lang d>/** |
<lang d>/** |
||
This is a documentation comment for someFunc and someFunc2. |
|||
$(DDOC_COMMENT comment inside a documentation comment |
|||
* Does not need to be preceded by '*' in every line - this is done purely for code style |
|||
(results in a HTML comment not displayed by the browser)) |
|||
Header: |
|||
content (does not need to be tabbed out; this is done for clarity |
|||
of the comments and has no effect on the resulting documentation) |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
* BUGS: |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
{ |
|||
BUG: |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
// same doc and are listed together) |
|||
/// ditto |
/// ditto |
||
void |
void someFunc2(int arg1, int arg2) {} |
||
{ |
|||
/// Sum function. |
|||
int sum(in int x, in int y) pure nothrow { |
|||
return x + y; |
|||
⚫ | |||
// These unittests will become part of sum documentation: |
|||
/// |
|||
unittest { |
|||
assert(sum(2, 3) == 5); |
|||
} |
} |
||
/++ Another documentation comment +/ |
/++ Another documentation comment +/ |
||
void main() |
void main() {}</lang> |
||
{ |
|||
}</lang> |
|||
=={{header|Delphi}}== |
=={{header|Delphi}}== |