La lancetta viene aggiornata ogni secondo
Turtle.Speed=10 xc=GraphicsWindow.Width/2 yc=GraphicsWindow.Height/2 r =yc*0.8 s =Clock.Second While "true" sn=Clock.Second If(s <> sn) Then s=sn Turtle.Angle=6*s GraphicsWindow.PenColor=GraphicsWindow.GetRandomColor() Turtle.X=xc Turtle.Y=yc Turtle.PenDown() Turtle.Move(r) Turtle.PenUp() EndIf EndWhile
Secondi in analogico e digitale…
Turtle.Speed=10 xc=GraphicsWindow.Width/2+80 yc=GraphicsWindow.Height/2 r =yc*0.8 s =Clock.Second While "true" sn=Clock.Second If(s <> sn) Then s=sn Turtle.Angle=6*s c=GraphicsWindow.GetRandomColor() GraphicsWindow.PenColor =c GraphicsWindow.BrushColor=c GraphicsWindow.DrawText(10+16*Math.Remainder(s,10),10+16*Math.Floor(s/10),s) Turtle.X=xc Turtle.Y=yc Turtle.PenDown() Turtle.Move(r) Turtle.PenUp() EndIf EndWhile