Epson FX-185 User Manual - Page 204
If D>rnd8 Then F=f+2^absp+6-r, Print Printing Rows;p;to;p+6
View all Epson FX-185 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 204 highlights
is nearly all of the available memory on many personal computers. You are, therefore, not able to print significantly larger figures of this type with such computers. If you like the effect that is produced by this use of random numbers but would like a bigger printout without using more memory, there is a solution. The alternate method used in the program listed below does not use symmetry and uses very little of the computer's memory because it does not store data in an array. It is, however, not a perfect solution. As you might expect, there is a trade-off. Once you enter this program and type RUN, you must wait an agonizingly long time before it is finished. The program prints a figure that is over 36 square inches in area, but it takes seven to twelve hours to run. You will not, however, have to wait that long to see if the program is working correctly. After the second row starts printing (within 20 or 30 minutes), you can compare your partial printout with the figure on the next page to see whether or not your program is on the right track. We don't want to sound less than enthusiastic; we just want you to understand the consequences of using less memory. NEW 10 N=476: M=INT((N+1)/2): WIDTH LPRINT 255 20 N2=INT(N/256): N1=N-256*N2 30 LPRINT CHR$(27)"3"CHR$(20)CHR$(7); 40 FOR P=1 TO N-6 STEP 7 50 PRINT "PRINTING ROWS";P;"TO";P+6 60 LPRINT CHR$(27)"*"CHR$(5)CHR$(N1)CHR$(N2); 70 FOR C=1 TO N 80 F=0: PRINT C; 90 FOR R=P TO P+6 100 D=((R-M)^2+(C-M)^2)/M^2 110 IF D>RND(8) THEN F=F+2^ABS(P+6-R) 115 IF F=9 THEN F=10 120 NEXT R: LPRINT CHR$(F); 130 NEXT C: LPRINT: NEXT P 140 LPRINT CHR$(27)"@" 187