OOPS
The Letters to the Editor column in Issue #4 contained three printing errors:
Robert Caufman’s REM suggestion should have been printed as follows:
FROM:
410 LET L$(N) = S$ (TO 29)
415 GOTO 500
TO:
410 REM LET L$(N) = S$ (TO 29)
411 LET L$(N) - S$ (TO 23)
415 GOTO 500
And David Farmer’s rounding-off correction for the Checkbook Manager was printed in the wrong position. The statement is:
2391 LET BA = INT (BA*100 + .1)/100
In the Bobsled Program, lines 70 and 75 should read:
70 PRINT AT 10,C; "V"; AT 10, C" "
75 PRINT AT 10,C;"▒"
Do not RUN to execute the program; instead enter the command GOTO 1000.
We apologize for any inconvenience resulting from these errors.
LETTERS TO THE EDITOR
“BUG” COLLECTOR
Meade Frierson III maintains a collection of “bugs” and other programming problems (and the appropriate solutions) on 3½”x5″ index cards. So, when a “bug” raises its ugly head, this Birmingham, Alabama, resident flips through the cards and frequently finds the appropriate “anti-bug” solution.
SOUNDING OFF ON ROUNDING OFF
All you need to do is incorporate the following one-line statement into your program to reduce large numbers into a much more manageable figure, says T/S user Joe Matherly of Coral Springs, Florida.
LET Z = INT (Z*.10**X) + .5) *(10**-X)
As illustrated by the programs below, X represents the variable in your program and Y is the number of places after the decimal point.
UNROUNDED
10 LET X = 25
20 LET Y = 3,8
30 LET Z = X/Y
40 PRINT AT 10,5;Z
= 6.5789474
ROUNDED
10 LET X = 25
20 LET Y = 3.8
30 LET Z = X/Y
40 LET Z = INT (Z*(10**2) + .5)*(10**-2)
50 PRINT AT 10,5;Z
= 6.58
THE PROFESSIONAL TOUCH
Here’s a tip that comes to us from Dick Sieg’s Cleveland, Ohio, Timex/Sinclair User Group announcement:
The PAUSE 4E4 command can be used to stop a program when this command is encountered. Then, when you press any key, the program resumes from the point of interruption.
PROGRAMMING CAN BE FUN
You can duplicate the following programs on your TIMEX Personal Computer to find out just how much fun programming can be. We are indebted to the T/S users identified by the first program REM for submitting the programs to RAMBLINGS.
MUSICAL COMPUTER
One of the least publicized — but potentially most enjoyable — capabilities of the TIMEX Personal Computer is the ability to produce music. As demonstrated by the program below, a series of endless FOR/NEXT loops (five in this program) of varying duration simulate the different notes of a musical scale.
To play this composition, place a portable AM radio next to the TV jack of your computer. Tune the radio to an open frequency for the best sound reproduction. Now, RUN to execute the program and BREAK to stop it.
5 REM BY JULIE KNOTT AND DAVE PROCHNOW, BELLEVUE, NE.
7 REM DESCENDING TONES
10 FOR A = 1 TO 5
20 FOR B = 1 TO 25
30 GOSUB 190
40 NEXT B
50 FOR C = 1 TO 50
60 GOSUB 190
70 NEXT C
80 FOR D = 1 TO 75
90 GOSUB 190
100 NEXT D
110 FOR E = 1 TO 50
120 GOSUB 190
130 NEXT E
140 FOR F = 1 TO 100
150 GOSUB 190
160 NEXT F
170 NEXT A
180 GOTO 10
190 SLOW
200 FAST
210 RETURN
Altering the tone duration is accomplished by changing the upper limit of the FOR/NEXT statement; tone color is modified by adding different keywords in Statement 195 (try CLS, SCROLL, RUN and GOTO).
WHIZ KIDS
Most youngsters (and many adults) are particularly attracted to moving graphics. So, one of our T/S “whiz kids” has contributed this “Electronic Crayon” program which lets you draw pictures on your T/S 1000 Personal Computer. RUN to execute the program, BREAK to stop, press the C key to clear the screen to start a new drawing, and use the Arrow keys (5,6,7,8) to produce your “T/S masterpiece.”
5 REM BY MICHAEL BOUCHER
7 REM ELECTRONIC CRAYON
10 PRINT "USE THE ARROW KEYS TO DRAW ANY —"
11 PRINT "THING YOU WANT. USE THE C KEY"
12 PRINT "TO CLEAR THE SCREEN AND START"
13 PRINT "OVER."
20 PAUSE 100
30 CLS
40 LET A = 30
50 LET B = 10
60 PLOT A,B
70 IF INKEY$ = "5" THEN GOTO 130
80 IF INKEY$ = "6" THEN GOTO 150
90 IF INKEY$ = "7" THEN GOTO 170
100 IF INKEY$ = "8" THEN GOTO 190
110 IF INKEY$ = "C" THEN GOTO 30
120 GOTO 60
130 LET A = A-1
140 GOTO 60
150 LET B = B-1
160 GOTO 60
170 LET B = B + 1
180 GOTO 60
190 LET A = A + 1
200 GOTO 60