BobDevries
 Senior Member
 Joined: 08/06/2011 Location: AustraliaPosts: 266 |
| Posted: 02:55am 08 Jun 2011 |
|
|
|
I just wrote a few lines of BASIC to invert the screen using Geoff's new pixel() command. It takes over two minutes to do it this way:
10 PRINT TIME$
20 FOR x=0 TO 480
30 FOR y=0 TO 432
40 z=PIXEL(x,y)
50 IF z=0 THEN z=1 ELSE z=0
60 PIXEL(x,y)=z
70 NEXT y,x
80 PRINT TIME$
Rearranging the order of the FOR-NEXT loops actually makes it slower!
Regards, Bob Devries Dalby, QLD, Australia |