Help:Adding a new programming example: Difference between revisions
Help:Adding a new programming example (view source)
Revision as of 22:39, 28 September 2022
, 1 year agoUpdate syntax highlighting
No edit summary |
Thundergnat (talk | contribs) m (Update syntax highlighting) |
||
(One intermediate revision by one other user not shown) | |||
Line 9:
==Navigation==
To add your own programming example, you must [[:Category:Solutions by Programming Task|navigate]] to the programming task to which you wish to add a solution
In order to maintain the readability, searchability and browseability of Rosetta Code, we need you to follow certain formatting rules. Please ensure that your contributed code conforms to one of these [[Help:Programming Example Prototypes|programming example prototypes]]. A simple example should look something like this:
Line 19:
Optional text explaining stuff
<syntaxhighlight lang="c">
int main ( void ) {
// Some code here
}
</syntaxhighlight>
</lang></nowiki>▼
{{out}}
<pre>
Output, if desired or necessary
You don't have to use the C programming language, and your code example will probably be different. You need to make sure you create a link to your language of choice, and to your compiler, interpreter, or what-have-you using the "works with" template. You should also note any special [[libraries]] you use with the "libheader" template.
The <nowiki><
The output section is only necessary if desired, or if the task requires to show output.
==Formatting==
|