-
Notifications
You must be signed in to change notification settings - Fork 6
/
test-rebol-Stackoverflow.html
48 lines (45 loc) · 2.02 KB
/
test-rebol-Stackoverflow.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="http://cdn.sstatic.net/stackoverflow/all.css" />
<script type="text/javascript" src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
<script type="text/javascript" src="lang-rebol.js"></script>
</head>
<body>
<h1>Rebol</h1>
<h2>Using Stackoverflow CSS</h2>
<div><div class="post-text" itemprop="description"><pre class="prettyprint lang-rebol" style="text-align: left"><code>
#!/usr/bin/env rebol -qs
Rebol []
; this is a comment
foo: func [x] [x + x]
baz: func ["baz function" x [integer!]] [x + x]
duff: "duff"
block: [a b c d :foo! :foo? :foo/bar/baz 'foo! 'foo? 'foo/bar/baz baz@example.com /refinement path/to/2 duff]
constants: [duff none true false on off yes no duff notnone one nope false]
hash-lit: [duff #"c" #{899AEFD8} 2#{10010110110010101001011011001011} #111-111-111 #SKU-1000 #[none] #[image! xx] #[duff] duff]
files: [duff %file.txt %../blah/ %\reverse\path/ %file%20name.dat duff %/ %-hy.txt %_und.txt]
long-str: {
line 1 - if 1 = 1 [print "hello"]
line 2 - ^{simple brace^} and ^} ^} So highlighting shouldn't end here
line 3 - 'one ^() #"X" blah blah
}
print length? long-str ; end of line comment
the-end: [duff 25-Dec-2012 1-1-12 2/2/2002 31-December-1999 00:00:00 23:59 24-May-2013/16:41:52+1:00 duff]
num!bers: [duff 1 0.1 10x90 1.1x12,22 99% 1'000.00 1'000'000 1,1 1.1.1 -1 +10.5 -10% 1'000% duff]
money: [duff $100.00 +$100 -GBP$99.99 US$1'000.99 $100,001 duff]
schemes: [duff http://rebol.com ftp://ftp.ftp.com duff://blahblah duff]
series: compose ["one" 'one :foo (1 + 1) (baz xor~ 5 2)]
bar: make object! [a: 1]
block/1: 10
baz: block/(1 + length? duff)
replace/all block 'b 'B
comment {
multiline comment
}
print: func [x] [print x] ; check to see if any keyword side-effect with print here
replaceit: func [replace-foo-to] [if 1 != 2 [replace-foo-to]]
foreach a series [print a] print reduce the-end
</code></pre></div></div>
</body>
</html>