| (2 intermediate revisions by one user not shown) | |||
| Line 5: | Line 5: | ||
<!--T:2--> | <!--T:2--> | ||
| − | :For formally marking up code examples or making a synopsis, you should study the Duck Book and the [[Documentation Primer/Manual/DocBook Reference/Synopsis|The synopsis elements]] chapter. The elements described below are mainly for marking up of pieces of source code that appear in the running text. Remember that KDE and KDE applications are written almost exclusively in C++, so our useage may differ in places from the examples in the Duck book, which may be describing other programming languages. | + | :For formally marking up code examples or making a synopsis, you should study the Duck Book and the [[Special:myLanguage/Documentation Primer/Manual/DocBook Reference/Synopsis|The synopsis elements]] chapter. The elements described below are mainly for marking up of pieces of source code that appear in the running text. Remember that KDE and KDE applications are written almost exclusively in C++, so our useage may differ in places from the examples in the Duck book, which may be describing other programming languages. |
<!--T:3--> | <!--T:3--> | ||
| Line 38: | Line 38: | ||
<!--T:12--> | <!--T:12--> | ||
| − | :These are normally marked up as {{Tag|methodname}}, but if you need to make a synopsis of a method, there are specific elements available: | + | :These are normally marked up as {{Tag|methodname}}, but if you need to make a synopsis of a method, there are specific elements available: {{Tag|constructorsynopsis}} and {{Tag|destructorsynopsis}} |
<!--T:13--> | <!--T:13--> | ||
| Line 167: | Line 167: | ||
<anchor id="constructorsynopsis"/> | <anchor id="constructorsynopsis"/> | ||
<anchor id="destructorsynopsis"/> | <anchor id="destructorsynopsis"/> | ||
| − | <anchor id="classsynopsisinfo" | + | <anchor id="classsynopsisinfo"> |
<anchor id="methodparam"/> | <anchor id="methodparam"/> | ||
<anchor id="methodsynopsis"/> | <anchor id="methodsynopsis"/> | ||
| Line 176: | Line 176: | ||
<!--T:47--> | <!--T:47--> | ||
{{Prevnext2 | {{Prevnext2 | ||
| − | | prevpage=Documentation Primer/Manual/DocBook Reference/Synopsis | + | | prevpage=Special:myLanguage/Documentation Primer/Manual/DocBook Reference/Synopsis |
| prevtext=The synopsis elements | | prevtext=The synopsis elements | ||
| − | | nextpage=Documentation Primer/Manual/DocBook Reference/Callouts | + | | nextpage=Special:myLanguage/Documentation Primer/Manual/DocBook Reference/Callouts |
| nexttext=Making Callouts | | nexttext=Making Callouts | ||
| − | | index=Documentation Primer/Manual | + | | index=Special:myLanguage/Documentation Primer/Manual |
| indextext=Back to Menu | | indextext=Back to Menu | ||
}} | }} | ||
</translate> | </translate> | ||
<classname>
<function>, <methodname>
| Tip |
|---|
| Asking a developer "What is foo?" will likely result in a two page explanation of a finer point of C++ programming, which, if you could understand it, you wouldn't have needed to ask the question in the first place. It saves everyone a lot of time and frustration if you word the question "Out of function, method, constructor and destructor, which is the best fit for foo?". |
<varname>
<returnvalue>
<token>
<constant>
enum MyType { Red = 0, Green, Blue, Yellow };
<type>
enum MyType { Red = 0, Green, Blue, Yellow };
<programlisting>
<structname>,<structfield>
<parameter>
<classsynopsis>
DCOPStub {
? not sure about what goes here ? enum Status(''CallSucceeded'', ''CallFailed'');
}
<initializer>
<exceptionname>