Page 263 - Learn to Program - Basic-256
P. 263
Chapter 16: Mathematics – More Fun With Numbers. Page 247
27 call drawhand(150,150,m,75,4,red)
28 call drawhand(150,150,second,100,3,blue)
29 refresh
30 pause 1
31 end while
32
33 subroutine drawhand(x, y, f, l, w, handcolor)
34 # pass the location x and y
35 # f as location on face of clock 0-59
36 # length, width, and color of the hand
37 color handcolor
38 stamp x, y, 1, f/60*2*pi - pi / 2, {0,-w,l,0,0,w}
39 end subroutine
Program 105: Big Program – Clock with Hands
Sample Output 105: Big Program – Clock with Hands
© 2019 James M. Reneau (CC BY-NC-SA 3.0 US)

