/
connie.toby
74 lines (62 loc) · 1.15 KB
/
connie.toby
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//
// Something quick to test STEP...first four
// circles should have turtle loop around
// it three times. The next four should just draw.
//
// Copyright (c) 1999 Lighting and Sound Technologies.
// Written by Ryan C. Gordon.
function main() returns nothing
number i
setPenColor(1)
for i = 1 to 360
turnRight(3)
goForward(5)
endfor
for i = 1 to 360 step 1
turnLeft(3)
goForward(5)
endfor
turnRight(90)
for i = 360 downto 1
turnRight(3)
goForward(5)
endfor
for i = 360 downto 1 step -1
turnLeft(3)
goForward(5)
endfor
setPenColor(2)
// these four for loops should not run...
for i = 1 downto 360 step -1
goForward(1000)
endfor
for i = 360 to 1 step 1
goForward(1000)
endfor
for i = 1 downto 360 step -1.7
goForward(1000)
endfor
for i = 360 to 1 step 1.5
goForward(1000)
endfor
setPenColor(4)
turnRight(45)
for i = 1 to 360 step 3.0
turnRight(3)
goForward(5)
endfor
for i = 1 to 360 step 3
turnLeft(3)
goForward(5)
endfor
turnRight(90)
for i = 360 downto 1 step -3.0
turnRight(3)
goForward(5)
endfor
for i = 360 downto 1 step -3
turnLeft(3)
goForward(5)
endfor
hideTurtle()
endfunction