|
|
|
Algorithms Used in my Programming:
ScreenSaver 49: The HP49G has three functions that I mainly used in this program. They are RAND, WAIT, and DISPLAY. RAND returns a random decimal number between 0 and 1. DISPLAY displays text to the display, at a given location. Its arguments are ("String", Location (0-7)). WAIT pauses the system a given amount of time. To have a random number between 0 and 'n' returned, the following line of code should be used: FLOOR(RAND * n + 1) It is also possible to add strings together. For example, "String1" + "String2" = "String1String2". To get a random number of spaces over to the right of the display, the random number algorithm mentioned above should be used in combination with a look that adds spaces, " ", together through a loop, and stores them to a variable. In each run of the randomly decided loop, the following line of code could be used: S + " " -> S I am currently in the process of making a snow screensaver. As soon as that it completed, I will have more programming tips listed here. |
|
Copyright © 2001 Floogy's HP49G Site
|