Greyscale bars/Display: Difference between revisions

m
Tidying up
m (Tidying up)
Line 1:
{{task}}[[Category:Test card]]
 
The task is to display a series of vertical greyscale bars (contrast bars) across the width of the display.
 
Line 9 ⟶ 8:
Halfway down the display, we start with black, and produce 32 bars, ending in white, and for the last quarter, we start with white and step through 62 shades of grey, before finally arriving at black in the bottom right hand corner, producing a total of 64 bars for the bottom quarter.
 
=== {{header|ZX Spectrum Basic}} ===
 
ZX Spectrum Basic cannot natively produce greyscale. However, the colours have been
Line 15 ⟶ 14:
and we have a set of 8 bars:
 
<lang basic>10 REM wind the colour down or use a black and white television to see greyscale bars
<lang basic>
10 REM wind the colour down or use a black and white television to see greyscale bars
20 REM The ZX Spectrum display is 32 columns wide, so we have 8 columns of 4 spaces
30 FOR r=0 TO 20: REM There are 21 rows
Line 23 ⟶ 21:
60 NEXT c
70 REM at this point the cursor has wrapped, so we don't need a newline
80 NEXT r</lang>
</lang>
 
[[Category:Test card]]
=={{header|PureBasic}}==
<lang PureBasic>If Not InitKeyboard(): End: EndIf ;can't init keyboard
Anonymous user