Rosetta Code:Solve a Task: Difference between revisions

Restored to undamaged version
(Restored to undamaged version)
Tag: Manual revert
 
(32 intermediate revisions by 11 users not shown)
Line 13:
 
==Adding Code==
 
Language examples on each page are in alphabetical order, so you need to find where your example would fit. Once you've found that, click the "edit" link closest above the area where you want to insert your code on the task page, and add something like this to the bottom of the edit field:
 
<pre>
<pre>=={{header|Ayrch}}==
 
<syntaxhighlight lang="ayrch">PRINT "Goodbye, World!"</syntaxhighlight>
 
# s = words speed per minute
 
from subprocess import call
 
call(["espeak","-s160","Hello World"])
 
</pre>
 
Remember, for the sake of simplicity, we're assuming your language is Ayrch, and the task is [[Hello world]]. We're also assuming, for the moment, that Ayrch looks a lot like BASIC.
 
Once you've added your code, hit the preview button to make sure you crossed all your T's and closed all your tags. If the language name shows up in red (a broken link), then either the language doesn't exist on the site yet (as a category), or you misspelled/mis-capitalized the name. Check your spelling against the one in [[:Category:Programming Languages]].
 
That's all you really need to do!
 
Line 45 ⟶ 35:
It's perfectly all right to depend on external (or even non-standard) libraries in your code examples. However, it can be problematic for others if they don't know they need to use a library, or don't know where to find it. There's a template for that: '''libheader'''.
 
<pre>
<pre>=={{header|Ayrch}}==
=={{header|Ayrch}}==
 
{{libheader|Ayrch Console Extensions}}
 
<syntaxhighlight lang ="ayrch">PRINT "Goodbye, World!"</lang></presyntaxhighlight>
</pre>
 
The '''libheader''' template identifies that your code uses that library, and will even provide a link to where a description of that library may be found.
 
==Works With==
Line 57 ⟶ 47:
 
<pre>
=={{header|Ayrch}}==
 
{{works with|Ayrch Virtual Machine|6.2}}
 
<syntaxhighlight lang="ayrch">PRINT "Goodbye, World!"</syntaxhighlight>
Works with:python2.7
 
</pre>
7,795

edits