Marty Irons of Goshen, NY, sent this version of Herb Magnus‘ READ-DATA-RESTORE (Apr.82). It loads an array from a literal string, including decimal places and multipliers. Line 30 sets the decimal point. Use P=0 for integers, P=2 for two decimal places. P=-3 multiplies the value by 10³. Line 10 sets the numbers of entries in array D. Line 40 sets the characters/number. Line 50 holds data. Line 75 prints results. If A$ is too short for the READ routine (60-80), error code 3 results.
10 LET E=10
20 DIM D(E)
30 LET P=2
40 LET L=3
50 LET A$="123456789012345678901234567890"
60 FOR N=1 TO E
70 LET D(N)=(VAL (A$(N*L-L+1 TO N*L)))/(10**P)
75 PRINT "D(";N;")","= ";D(N)
80 NEXT N
SYNTACTIC SUM: 9309, 8K
Frank O’Hara of Surrey, UK sent a 16K version of Bill Wentz‘ Flower Plot (Apr.82). Load points into an array in FAST, then go to SLOW for a moving display, which repeats after a flicker-free pause. This method works for all such displays. For N=99 and 999, try 301 for 601 in line 78.
5 REM HOTHOUSE PLOT (16K)
6 FAST
7 DIM X(601)
8 DIM Y(601)
10 LET N=456
20 LET D=2*PI/600
30 LET P=20
40 FOR I=0 TO 600
50 LET T=D*I
55 LET R=P*SIN (N*T)
60 LET X(I+1)=R*COS T+31
70 LET Y(I+1)=R*SIN T+21
72 NEXT I
74 SLOW
76 CLS
78 FOR I=1 TO 601
80 PLOT X(I),Y(I)
90 NEXT I
100 FOR I=1 TO 100
110 NEXT I
120 GOTO 76
SYNTACTIC SUM: 19308, 8K
Bill Bruton of N.Olmstead, OH, sent these changes to Lane Lester‘s Income Tax program (Mar.82 p.8):
The first 3 characters from line 2124 don’t clear before line 6000 executes. Change 6000 to PRINT AT 21,0…Change 9006 to REM DIM C$(107,18) to remind you of the direct command to enter during initialization. The 18-character line description will only be 1 character without it.
Line 2220 simply sums the previous 4 lines–a problem for casualty or theft losses. To fix the problem and save entries:
2219 LET L(93)=L(91)-L(94)
2220 IF L(93)<0 THEN LET L(93)=0
2221 LET L(94)=L(93)
2222 IF L(94)>100 THEN LET L(94)=100
2223 LET L(95)=L(93)-L(94)
2224 LET L(98)=L(96)+L(97)
2225 LET L(99)=L(76)
A refinement for rounding:
2200 LET L(69)=INT (L(31)+.5)/100
2201 LET L(70)=L(68)-L(69)
2206 LET L(74)=3*L(69)
Line 2160 can cause a problem when reviewing data because of computer precision shortcomings. Part of the display will be overwritten by the message at review end because of lines over 32 characters. Change line 2160 to:
2160 LET L(63)=INT (100*X+.5)/100
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.