Help:Adding a new compiler/interpreter: Difference between revisions

(→‎Creating a New Example: Fixed links to point to compiler, not compiler collection)
 
(2 intermediate revisions by the same user not shown)
Line 9:
 
<nowiki>
==[[{{header|C]]}}==
'''Compiler:''' [[gcc]] 4.0.1
Line 24:
If there's already a programming example written in a language your compiler supports, then all you need to do is ensure that the programming example works as expected in your compiler. Once you've determined that, you need only add your compiler to the list of compilers that support that code and that programming language.
 
Assuming you want to add Visual Studio.NETC++ 2005 to the list of compilers that support a programming example written in C++...
 
<nowiki>
==[[C plus plus{{header|C++]]}}==
'''Compiler:''' [[GCCg++]] 4.0.1
int main ( void ) {
// Some code here
Line 36:
 
<nowiki>
==[[C plus plus{{header|C++]]}}==
'''Compiler:''' [[GCCg++]] 4.0.1, [[Visual Studio.NETC++]] 2005
int main ( void ) {
// Some code here
Line 48:
If a programming example which mentions the compiler already exists, creating a compiler page is extremely simple. Just click on the link to the compiler link, and click "Create this article", on the resulting page. Add whatever information is appropriate, and end the article with the compiler template.
 
===Compiler/Interpreter Template?===
 
That's right. EachThere's compilera pagetemplate hasto theget compiler template applied to it, and each interpreter pagepages hasstarted. the interpreterTo template applied touse it., create Each template points out that theyour article, describesand abegin compilerit or interpreter,with depending<nowiki>{{implementation|Langauge}}</nowiki>, and offersreplace a"Language" linkwith pointingthe backlanguage to any page that points to it. In this way, someone curious about ayour compiler or interpreter can find all of the programming examples that use itimplements.
 
Click Preview Page, and you can see what your page will look like. If it still looks somewhat sparse, and you don't have anything else to add, you can add <nowiki>{{stub}}</nowiki> to the page.
The templates also add the page to the Compilers and Interpreters category, so that people interested in seeing a complete list of compilers and interpreters at Rosetta Code can go to the Compilers and Interpreters Category index page to see the list.
 
To add the compiler template to a page, add the text <nowiki>{{compiler}}</nowiki> to the end of the page. To add the interpreter template to a page, add the text <nowiki>{{interpreter}}</nowiki> to the end of the page.
 
Click Preview Page, and you can see what your page will look like. Click Save Page, and you'll also see the page added to the Compilers and InterpretersImplementations category.
 
Cool, huh?