Help:Programming Example Prototypes: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎[[Your Language Here]]: Eight or so preview cycles, and I still missed this error. I need some sleep.)
(Added works with, lang tags)
 
(19 intermediate revisions by 4 users not shown)
Line 6: Line 6:
----
----


''When using a [[compiler]] and a [[library]], with illustrative text:
''When using a [[compiler]] and a [[library]], with illustrative text:''


==[[Your Language Here]]==
=={{header|Your Language Here}}==
[[Category:Your Language Here]]
'''Compiler:''' [[Your Compiler Here]] (Your version here)
'''Compiler:''' [[Your Compiler Here]] (Your version here)
[[Category:Your Compiler Here]]
[[Category:Your Compiler Here]]


'''Library:''' [[Your Library Here]]
{{libheader|Your Library Here}}
[[Category:Your Library Here]]


Some code.
Some code.
Line 26: Line 24:
----
----


''When using a compiler and a library, but without illustrative text:
''When using a compiler and a library, but without illustrative text:''


==[[Your Language Here]]==
=={{header|Your Language Here}}==
[[Category:Your Language Here]]
'''Compiler:''' [[Your Compiler Here]] (Your version here)
'''Compiler:''' [[Your Compiler Here]] (Your version here)
[[Category:Your Compiler Here]]
[[Category:Your Compiler Here]]


'''Library:''' [[Your Library Here]]
{{libheader|Your Library Here}}
[[Category:Your Library Here]]


Some code.
Some code.
Line 42: Line 38:
----
----


''When using an [[interpreter]] and a library, with illustrative text:
''When using an [[interpreter]] and a library, with illustrative text:''


==[[Your Language Here]]==
=={{header|Your Language Here}}==
[[Category:Your Language Here]]
'''Interpreter:''' [[Your Interpreter Here]] (Your version here)
'''Interpreter:''' [[Your Interpreter Here]] (Your version here)
[[Category:Your Interpreter Here]]
[[Category:Your Interpreter Here]]


'''Library:''' [[Your Library Here]]
{{libheader|Your Library Here}}
[[Category:Your Library Here]]


Some code.
Some code.
Line 62: Line 56:
----
----


''When using an interpreter and a library, but without illustrative text:
''When using an interpreter and a library, but without illustrative text:''


==[[Your Language Here]]==
=={{header|Your Language Here}}==
[[Category:Your Language Here]]
'''Interpreter:''' [[Your Interpreter Here]] (Your version here)
'''Interpreter:''' [[Your Interpreter Here]] (Your version here)
[[Category:Your Interpreter Here]]
[[Category:Your Interpreter Here]]


'''Library:''' [[Your Library Here]]
{{libheader|Your Library Here}}
[[Category:Your Library Here]]


Some code.
Some code.
Line 78: Line 70:
----
----


''When using a compiler, with illustrative text:
''When using a compiler, with illustrative text:''


==[[Your Language Here]]==
=={{header|Your Language Here}}==
[[Category:Your Language Here]]
'''Compiler:''' [[Your Compiler Here]]
'''Compiler:''' [[Your Compiler Here]]
[[Category:Your Compiler Here]]
[[Category:Your Compiler Here]]
Line 95: Line 86:
----
----


''When using a compiler, but without illustrative text:
''When using a compiler, but without illustrative text:''


==[[Your Language Here]]==
=={{header|Your Language Here}}==
[[Category:Your Language Here]]
'''Compiler:''' [[Your Compiler Here]] (Your version here)
'''Compiler:''' [[Your Compiler Here]] (Your version here)
[[Category:Your Compiler Here]]
[[Category:Your Compiler Here]]
Line 108: Line 98:
----
----


''When using an interpreter, with illustrative text:
''When using an interpreter, with illustrative text:''


==[[Your Language Here]]==
=={{header|Your Language Here}}==
[[Category:Your Language Here]]
'''Compiler:''' [[Your Interpreter Here]] (Your version here)
'''Compiler:''' [[Your Interpreter Here]] (Your version here)
[[Category:Your Interpreter Here]
[[Category:Your Interpreter Here]]


Some code.
Some code.
Line 127: Line 116:
''When using an interpreter, but without illustrative text:
''When using an interpreter, but without illustrative text:


==[[Your Language Here]]==
=={{header|Your Language Here}}==
[[Category:Your Language Here]]
'''Interpreter:''' [[Your Interpreter Here]] (Your version here)
'''Interpreter:''' [[Your Interpreter Here]] (Your version here)
[[Category:Your Interpreter Here]
[[Category:Your Interpreter Here]]


Some code.
Some code.
Line 138: Line 126:
----
----


''''When you don't know the compiler or interpreter, but you're using a library, and you are using illustrative text:
''When you don't know the compiler or interpreter, but you're using a library, and you are using illustrative text:''


==[[Your Language Here]]==
=={{header|Your Language Here}}==
[[Category:Your Language Here]]
{{libheader|Your Library Here}}
'''Library:''' [[Your Library Here]]
[[Category:Your Library Here]]


Some code.
Some code.
Line 155: Line 141:
----
----


''''When you don't know the compiler or interpreter, but you're using a library, and you are not using illustrative text:
''When you don't know the compiler or interpreter, but you're using a library, and you are not using illustrative text:''


==[[Your Language Here]]==
=={{header|Your Language Here}}==
[[Category:Your Language Here]]
{{libheader|Your Library Here}}
'''Library:''' [[Your Library Here]]
[[Category:Your Library Here]]


Some code.
Some code.
Line 168: Line 152:
----
----


''''When you don't know the compiler or interpreter, and you are using illustrative text:
''When you don't know the compiler or interpreter, and you are using illustrative text:''

==[[Your Language Here]]==
[[Category:Your Language Here]]


=={{header|Your Language Here}}==
Some code.
Some code.
Notice how each line begins with at least one space.
Notice how each line begins with at least one space.
Line 183: Line 165:
----
----


''''When you don't know the compiler or interpreter, and you are not using illustrative text:
''When you don't know the compiler or interpreter, and you are not using illustrative text:''

==[[Your Language Here]]==
[[Category:Your Language Here]]


=={{header|Your Language Here}}==
Some code.
Some code.
Notice how each line begins with at least one space.
Notice how each line begins with at least one space.
Multiple spaces are fine; Please use proper indentation in your code.
Multiple spaces are fine; Please use proper indentation in your code.
=={{header|Your Language Here}}==
<lang c>int main(){
printf("this is highlighted code");
printf("there is no need for spaces at the start of lines");
return 0;
}</lang>
=={{header|Your Language Here}}==
{{works with|library/compiler/interpreter|Version Number}}
<lang c>int main(){
printf("this is highlighted code");
printf("there is no need for spaces at the start of lines");
return 0;
</lang>

Latest revision as of 14:50, 2 February 2009

These are prototypes of well-formed programming examples conforming to curring Rosetta Code formatting style. View this page's source to see how to construct your own programming examples.

Use the one which supplies the most information possible.

Prototypes


When using a compiler and a library, with illustrative text:

Your Language Here

Compiler: Your Compiler Here (Your version here)

Some code.
Notice how each line begins with at least one space.
  Multiple spaces are fine; Please use proper indentation in your code.

Here, I can talk a bit about the next bit of code.

Now I'm typing more code, with the spaces again at the beginning of the line.

Now I'm talking about the next bit of code again.

And here's that final bit of code...

When using a compiler and a library, but without illustrative text:

Your Language Here

Compiler: Your Compiler Here (Your version here)

Some code.
Notice how each line begins with at least one space.
  Multiple spaces are fine; Please use proper indentation in your code.

When using an interpreter and a library, with illustrative text:

Your Language Here

Interpreter: Your Interpreter Here (Your version here)

Some code.
Notice how each line begins with at least one space.
  Multiple spaces are fine; Please use proper indentation in your code.

Here, I can talk a bit about the next bit of code.

Now I'm typing more code, with the spaces again at the beginning of the line.

Now I'm talking about the next bit of code again.

And here's that final bit of code...

When using an interpreter and a library, but without illustrative text:

Your Language Here

Interpreter: Your Interpreter Here (Your version here)

Some code.
Notice how each line begins with at least one space.
  Multiple spaces are fine; Please use proper indentation in your code.

When using a compiler, with illustrative text:

Your Language Here

Compiler: Your Compiler Here

Some code.
Notice how each line begins with at least one space.
  Multiple spaces are fine; Please use proper indentation in your code.

Here, I can talk a bit about the next bit of code.

Now I'm typing more code, with the spaces again at the beginning of the line.

Now I'm talking about the next bit of code again.

And here's that final bit of code...

When using a compiler, but without illustrative text:

Your Language Here

Compiler: Your Compiler Here (Your version here)

Some code.
Notice how each line begins with at least one space.
  Multiple spaces are fine; Please use proper indentation in your code.

When using an interpreter, with illustrative text:

Your Language Here

Compiler: Your Interpreter Here (Your version here)

Some code.
Notice how each line begins with at least one space.
  Multiple spaces are fine; Please use proper indentation in your code.

Here, I can talk a bit about the next bit of code.

Now I'm typing more code, with the spaces again at the beginning of the line.

Now I'm talking about the next bit of code again.

And here's that final bit of code...

When using an interpreter, but without illustrative text:

Your Language Here

Interpreter: Your Interpreter Here (Your version here)

Some code.
Notice how each line begins with at least one space.
  Multiple spaces are fine; Please use proper indentation in your code.

When you don't know the compiler or interpreter, but you're using a library, and you are using illustrative text:

Your Language Here

Some code.
Notice how each line begins with at least one space.
  Multiple spaces are fine; Please use proper indentation in your code.

Here, I can talk a bit about the next bit of code.

Now I'm typing more code, with the spaces again at the beginning of the line.

Now I'm talking about the next bit of code again.

And here's that final bit of code...

When you don't know the compiler or interpreter, but you're using a library, and you are not using illustrative text:

Your Language Here

Some code.
Notice how each line begins with at least one space.
  Multiple spaces are fine; Please use proper indentation in your code.

When you don't know the compiler or interpreter, and you are using illustrative text:

Your Language Here

Some code.
Notice how each line begins with at least one space.
  Multiple spaces are fine; Please use proper indentation in your code.

Here, I can talk a bit about the next bit of code.

Now I'm typing more code, with the spaces again at the beginning of the line.

Now I'm talking about the next bit of code again.

And here's that final bit of code...

When you don't know the compiler or interpreter, and you are not using illustrative text:

Your Language Here

Some code.
Notice how each line begins with at least one space.
  Multiple spaces are fine; Please use proper indentation in your code.

Your Language Here

<lang c>int main(){

  printf("this is highlighted code");
  printf("there is no need for spaces at the start of lines");
  return 0;

}</lang>

Your Language Here

Works with: library/compiler/interpreter version Version Number

<lang c>int main(){

  printf("this is highlighted code");
  printf("there is no need for spaces at the start of lines");
  return 0;

</lang>