:For x,1,150
:Output 4,x,"O"
:For y,0,30:EndFor

If you enter this code into a program, you will see a circle gradually move its way across your calculator's screen, much like in the screenshot above. But why does this work? The coding behind this is fairly simple: Every time after the O moves, it's horizontal position of the screen changes by 1 until it gets to 150 (the edge of the screen).

The part of this command that creates the animation effect is the For command, which gives the program a small space of time between changes in the position of the O. Without this, the program would move too fast to be noticed at all, and would just appear as a blank screen (if you don't believe it, take out the For and EndFor commands and see what happens!).

Using this concept of For commands along with changing text allows for more complex animation to take place, as well as using algorithmic coding like that seen in this program which can make harder animations easier to program.

Another important thing to note is that when animating, using either ClrIO or ClrDraw causes the screen to "flash". While this effect might not be noticed in a slower program, using it in very rapid animation causes the screen to flash rapidly. A good way around using ClrIO/ClrDraw and ultimately making the program much more professional looking is by replacing the functions with Output and PxlOff, respectively. For example in the above program replace the second ClrIO with Output 4,X," ". Making this simple change will ultimately make the program run smoother and better looking.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.