forked from hbekel/bpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.bpp
More file actions
57 lines (36 loc) · 1.13 KB
/
example.bpp
File metadata and controls
57 lines (36 loc) · 1.13 KB
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
49
50
51
52
53
54
55
56
57
goto main
screen: { !include source "screen.bpp" }
main: {
gosub screen.clear
gosub screen.theme
ask: print "how do you feel?":print
print "1) i feel great!"
print "2) nothing to complain about"
print "3) not so well..."
print "4) quit asking"
print
input a
rem check the range...
if a < 1 goto error
if a > 4 goto error
print
rem give the answer...
on a gosub answer.good, answer.neutral, answer.bad, done
rem repeat...
gosub delay
goto main
error: print: print "please enter a number between 1 and 4!":
gosub delay: gosub screen.clear
goto ask
answer: {
good: print "well that's swell!": goto done
neutral: print "ok, carry on then...": goto done
bad: on int(rnd(23)*3)+1 goto one, two, three
one: print "here, have a cookie!": goto done
two: print "dont' worry, be happy!": goto done
three: print "cheer up!": goto done
done: return
}
}
done: print: print "see ya!": end
delay: { for i = 0 to 1024: next i: return }