Colour bars/Display: Difference between revisions

Added FreeBASIC
(→‎{{header|Haskell}}: add graphical version using SFML)
(Added FreeBASIC)
Line 520:
] with-ui ;
MAIN: colors</lang>
 
=={{header|FreeBASIC}}==
<lang freebasic>' FB 1.05.0 Win64
 
' Draw the color bars on an 80 x 25 console using the system palette of 16 colors
' i.e. 5 columns per color
Width 80, 25
Shell "cls"
Locate ,, 0 '' turn cursor off
For clr As UInteger = 0 To 15
Color 0, clr
For row As Integer = 1 to 25
For col As UInteger = 1 To 5
Locate row, clr * 5 + 1
Print Space(5);
Next col
Next row
Next clr
 
Sleep
' restore default settings
Locate ,, 1 '' turn cursor on
Color 7, 0 '' white text on black background </lang>
 
=={{header|Haskell}}==
9,488

edits