Sandbox: Difference between revisions

From Rosetta Code
Content added Content deleted
No edit summary
No edit summary
Line 51: Line 51:
==Testing new language tags==
==Testing new language tags==
===Z80===
===Z80===
<code z80>
<lang z80>
; some random instructions
; some random instructions
ld a, 80h
ld a, 80h
Line 58: Line 58:
adc a, a
adc a, a
rst 0 ; reboot :-)
rst 0 ; reboot :-)
</code>
</lang>


===Whitespace===
===Whitespace===
<code whitespace>
<lang whitespace>
This may not be a meaningful whitespace
This may not be a meaningful whitespace
program,
program,
Line 67: Line 67:
just a highlighting test
just a highlighting test
anyway.
anyway.
</code>
</lang>


===AviSynth===
===AviSynth===
<code avisynth>
<lang avisynth>
AviSource("D:\clip.avi")
AviSource("D:\clip.avi")
ConvertToYUY2()
ConvertToYUY2()
PixieDust(5)
PixieDust(5)
</code>
</lang>


===POV-Ray===
===POV-Ray===
<code povray>
<lang povray>
#declare factorial = function(C) { prod(i, 1, C, i) }
#declare factorial = function(C) { prod(i, 1, C, i) }
#declare A = factorial(5);
#declare A = factorial(5);
sphere{0,A} // a sphere
sphere{0,A} // a sphere
</code>
</lang>


===Text===
===Text===
<code text>
<lang text>
Is this actually a programming language, or really just plain text?
Is this actually a programming language, or really just plain text?
</code>
</lang>


===What happens if a language doesn't exist?===
===What happens if a language doesn't exist?===
<code somelanguagethatdoesnotexist>
<lang somelanguagethatdoesnotexist>
some code
some code
more code;
more code;
* a b -> c /// &a1 ->>> 778
* a b -> c /// &a1 ->>> 778
(Probably this is an obfuscated language :-))
(Probably this is an obfuscated language :-))
</code>
</lang>


===Do the old language-free <nowiki><code></nowiki>-Tags (for inline code formatting) still work?
===Do the old language-free <nowiki><tt></nowiki>-Tags (for inline code formatting) still work?
The variable <code>foo</code> is of type <code>bar</code>
The variable <code>foo</tt> is of type <tt>bar</tt>


==Whitespace test with unicode ZERO WIDTH NO-BREAK SPACE character (U+FEFF)==
==Whitespace test with unicode ZERO WIDTH NO-BREAK SPACE character (U+FEFF)==
<code whitespace>
<lang whitespace>




</code>
</lang>

Revision as of 15:50, 3 February 2009

TITLE

yup...it's code

TEETLE

Your Other Library Here

coding it up here boss

TITLE

Your Library Here

Iterative

OMG teh code!

Recursive

doesn't really work this way

TITLE

Iterative

Your Library Here

some code

Recursive

Yet Another Library Here

more code

Still Another Library Here

this isn't code, though

TITLE

code

pre test

Test
Another line
Yet another line, this time one which clearly is much longer than the width of the browser window, at least assuming normal screen dimensions and font settings, and assuming the browser window is not wider than the screen (which would be impractical anyway).
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

Testing new language tags

Z80

<lang z80>

some random instructions
 ld a, 80h
 ld b, 9Ah
 add a, b
 adc a, a
 rst 0 ; reboot :-)

</lang>

Whitespace

<lang whitespace> This may not be a meaningful whitespace

 program,

but it's just a highlighting test anyway. </lang>

AviSynth

<lang avisynth> AviSource("D:\clip.avi") ConvertToYUY2() PixieDust(5) </lang>

POV-Ray

<lang povray>

  1. declare factorial = function(C) { prod(i, 1, C, i) }
  2. declare A = factorial(5);

sphere{0,A} // a sphere </lang>

Text

<lang text> Is this actually a programming language, or really just plain text? </lang>

What happens if a language doesn't exist?

<lang somelanguagethatdoesnotexist> some code more code;

  • a b -> c /// &a1 ->>> 778

(Probably this is an obfuscated language :-)) </lang>

===Do the old language-free <tt>-Tags (for inline code formatting) still work? The variable foo is of type bar

Whitespace test with unicode ZERO WIDTH NO-BREAK SPACE character (U+FEFF)

<lang whitespace> 


 </lang>