Jump to content

Help:Adding a new programming example: Difference between revisions

→‎Navigation: Added directions that lang tags should always be used even for unsupported languages
(→‎Navigation: updated example to new lang tags)
(→‎Navigation: Added directions that lang tags should always be used even for unsupported languages)
Line 27:
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><lang></nowiki> tags enclose the actual example, and allow [[Help:Syntax_highlighting|syntax highlighting]], which includes proper formatting for white space. Some languages don't have syntax highlighting support, but using the lang tags will not break anything. If your language is not supported, it will be as if you used pre tags. If support is added later, your example will automatically be highlighted, so add the lang tags no matter what.
 
==Formatting==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.