Tips and Tricks for the ST Owner
Compiled by Heidi Brumbaugh,
START Programs Editor
More on DESKTOP.INF
The Clipboard got a great response to a tip on the DESKTOP.INF file (Special Issue #4); we heard from quite a few readers who have tweaked this file and figured out what nearly every line does. Since this is definitely a hot topic, well continue to explore how this file works and how to customize it.
|Desktop Practical Jokes: Will the real trash can
please stand up?
Don says he uses the a folder icon to represent a RAMdisk; Robert says the program icon is a good way to represent a cartridge (which must be installed with a lowercase "c").
One final tip: When you're editing your DESKTOP.INF file, turn off your hard disk! Put the experimental files on floppy disks and use them to boot. You can't hurt your computer by trying different values in this file but you can lock up the system at boot time. You're better off booting from a floppy disk, so if your computer locks up you can simply boot from another disk and then go in and correct the problem.
Notes On GFA Optimization
Variables in GFA BASIC can be either strings (A$), reals (A), integers (A%) or booleans (A!). Using these variable types efficiently will improve your programs performance--often dramatically. Here are some benchmarks to give you an idea of the improvements to expect, but note: I ran the benchmarks first under the interpreter, then compiled. Separate times are given for each test (the first is interpreted, the second, compiled). The statement Tmstart=Timer was directly before each of these segments; after each segment was Tmstop=Timer and Tmdiff=(Tmstop-Tmstart)/200*60. All times are in Jiffies.
For I%=1 to 1000 ! 2.4, 0.9
For I=1 to 1000 ! 6.6, 3.3
Here's another performance tip: the Inc function increases the value of a variable by one--and is much faster than normal addition:
For I%=1 to 1000 ! 16.5,1.5
Count% = Count% + 1
Count% = 0
For I%=1 to 1000 ! 4.S, 1.2
Here are the same loops using reals instead of integers:
For I%=1 to 1000 ! 14.1, 4.8
Count= Count+ 1
For I%=1 to 1000 ! 8.4, 3
If you're interested in how boolean assignments stack up, here are the results of an assignment loop and logical operation loop:
For I%=1 To 1000 ! 6.9, 0.9
Count! = False!
For I%=1 To 1000 ! 12.9, 1.5
Got an ST trick or tip to share? Send it to Clipboard, START Magazine, 544 Second St., San Francisco, CA 94107.