Skip to content

Commit 0f65b5b

Browse files
committed
Add demo script
1 parent 54d59f9 commit 0f65b5b

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

demo.boi

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
boi: greet Hello, boi
2+
boi: subject Boi! boi
3+
boi, boi:greet " " boi:subject boi
4+
5+
boi, "Should say HELLO: " [int 72] [int 69] [int 76] [int 76] [int 79] boi
6+
7+
boi, "Should say D: " [+ A [int 3]] boi
8+
9+
boi! set a [int 1] boi
10+
boi! set b [int 2] boi
11+
boi, [dec [+ boi:a boi:b]] boi
12+
13+
boi! set subject "Boi!" boi
14+
boi, "Hello, " boi:subject boi
15+
16+
boi! say "here come dat" boi
17+
boi! "say" "here come dat" boi
18+
19+
boi! cat one two three boi
20+
boi, ret:exit boi
21+
22+
boi? cat true boi
23+
boi, "this will appear" boi
24+
BOI
25+
26+
boi? cat false boi
27+
boi, "this will not appear" boi
28+
BOI
29+
30+
boi! set a !int 5; boi
31+
boi! set b !int 4; boi
32+
boi, "a is " [dec boi:a] boi
33+
boi, "b is " [dec boi:b] boi
34+
boi, "a + b is " [dec [+ boi:a boi:b]] boi
35+
36+
37+
boi: tmp [int 0] boi
38+
bloop < boi:tmp [int 10] boi
39+
boi, "I say this 10 times" boi
40+
boi: tmp [+ boi:tmp [int 1]] boi
41+
BOI
42+

0 commit comments

Comments
 (0)