Munching squares: Difference between revisions
added FreeBASIC
(Added BBC BASIC) |
(added FreeBASIC) |
||
Line 366:
(plot-much) ;; ESC to see tge drawing
</lang>
=={{header|FreeBASIC}}==
<lang freebasic>' version 03-11-2016
' compile with: fbc -s gui
Dim As ULong x, y, r, w = 256
ScreenRes w, w, 32
For x = 0 To w -1
For y = 0 To w -1
r =(x Xor y) And 255
PSet(x, y), RGB(r, r , r) ' gray scale
' PSet(x, y), RGB(r, 255 - r, 0) ' red + green
' PSet(x, y), RGB(r, 0, 0) ' red
Next
Next
' empty keyboard buffer
While Inkey <> "" : Wend
WindowTitle "Close window or hit any key to end program"
Sleep
End</lang>
=={{header|GLSL}}==
|