Documentation: Difference between revisions
Content deleted Content added
Updated D entry |
|||
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).
<lang d>/**
$(DDOC_COMMENT comment inside a documentation comment
* Params:▼
* arg1 = Something (listed as "int <i>arg1</i> Something")▼
* arg2 = Something else▼
* Returns:▼
* Nothing▼
* TODO:▼
* Nothing at all▼
* None found▼
*/▼
void somefunc(int arg1, int arg2)▼
BUG:
}▼
// this groups this function with the above (both have the same doc and are listed together)▼
// same doc and are listed together)
/// ditto
void
/// 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 +/
void main() {}</lang>
=={{header|Delphi}}==
|