Whole Screen Not Drawn (2020-03-31 02:57 by toml_12953 #84669)
When I run this program in realtime BASIC, the screen should be filled before the program asks for a character.
Instead, most of the screen is filled, the system waits for a character then the rest of the screen is drawn after the character is typed.
10 LET gHeight=200
20 LET gWidth=320
30 SET WINDOW 0,gWidth,0,gHeight
50 RANDOMIZE
60 OPTION BASE 0
70 LET circles = 50
80 DIM y (50), x (50)
90 FOR i = 0 TO circles
100 LET y(i) = gHeight * rnd
110 LET x(i) = gWidth * rnd
120 NEXT i
130 FOR x1 = 0 TO gWidth-1
140 FOR y1 = 0 TO gHeight-1
150 LET r = 1000000
160 FOR i=0 TO circles
170 LET r1 = SQR ((x1 - x(i)) * (x1-x(i))+(y1-y(i))*(y1-y(i)))
180 IF r1 < r THEN LET r = r1
190 NEXT i
200 IF bitand(r/3,1) = 1 THEN
210 SET POINT COLOR 6 ! Yellow
220 ELSE
230 SET POINT COLOR 1 ! Black
240 END IF
250 PLOT POINTS: x1, y1
260 NEXT y1
270 NEXT x1
280 CHARACTER INPUT s$
999 END