by Charles A. Smith
] 20 ?"**********************" ] 30 ?"* *" ] 40 ?"* Program Title *" ] 50 ?"* *" ] 60 ?"**********************" ] 70 NORMAL ] RUN
Line 70 returns the text back to white on black, (or your standard screen colours.)
Another trick that makes good programming sense is the REM statement-
]300 GOSUB 5000 REM April Schedule
Line 300 begins with a command to GO to a SUBroutine which in this case is an April Schedule of some sort. REM is not a program command and ADAM dutifully ignores it. It is simply a convenient REMinder to the programmer as to what the Subroutine at Line 5000 was all about. This can be very helpful in reviewing or changing a program at a later date.
If you are typing a long program it's smart to SAVE it from time to time - possible power failure - ADAM forgets very quickly when turned off. Every time you add more to a previously SAVEd program give it a slightly different name or ADAM will store the same name twice. Delete the old one if you want by typing DELETE followed by the old name.
Now and then ADAM will signal that you have typed an ERROR. That's something that he just can't handle. A popular one is SYNTAX ERROR. Look and you'll probably find the error (I have yet to win an argument with a computer on that subject). At other times ADAM will reprint your faulty Line with a statement below telling you he expected something else. Very helpful - the APPLE II doesn't have that feature.
There are, of course, many other areas to cover but the foregoing should be enough either to whet your appetite or turn you off forever against BASIC programming. I hope it is the former - best of luck.
I have a feeling that the following short program was intended to be printed with Lesson 2, which dealt with graphics. My apologies if that was the case. Better late than never. BDC.WC
SMARTBASIC PROGRAM LISTING.
BY CHARLES A. SMITH.wA
20 COLOR =INT(RND(1)*16)
50 HLIN 0, x AT y
60 COLOR =INT(RND(1)*16)
70 VLIN 0, y AT x
80 GOTO 20