Anonymous user
Colour bars/Display: Difference between revisions
m
→{{header|REXX}}: changed/added comments and whitespace, changed indentations.
No edit summary |
m (→{{header|REXX}}: changed/added comments and whitespace, changed indentations.) |
||
Line 858:
{{works with|R4}}
{{works with|ROO}}
Programming note: because of the way the REXX interpreters (being used for this example) ensure screen output fidelity, if ninety characters are displayed on a ninety-byte wide screen, REXX apparently forces an extra blank, causing to what appears to be a blank line after the line displayed. Because of this, the last color bar ('''_.8''') has been shortened by one byte.▼
<br>
▲Programming note: because of the way the REXX interpreters (being used for this example) ensure screen output fidelity, if ninety characters are displayed on a ninety-byte wide screen, REXX apparently forces an extra blank, causing to what appears to be a blank line after the line displayed. Because of this, the last color bar ('''_.8''') has been shortened by one byte.
barWidth=sw%8 /*calculate bar width*/▼
▲barWidth=sw%8 /*calculate the bar width. */
hdr.
hdr.
hdr.
hdr.
hdr.
hdr.6 = x2c('1b5b313b33366d') /* " color cyan. */
tail = x2c('1b5b751b5b303b313b33363b34303b306d') /* epilogue, trailer.*/▼
hdr.7 = x2c('1b5b313b33336d') /* " color yellow.
hdr.8 = x2c('1b5b313b33376d')
▲ tail = x2c('1b5b751b5b303b313b33363b34303b306d') /* " epilogue, and the trailer.*/
do j=1 for 8
$=$ ||
end /*j*/ /* [
$=$ || tail
do k=1 for sd /*
say $ /*have REXX display line of bars. */
'''output''' appears identical to the output for '''Icon and Unicon''', '''Mathematica''', and '''R''' examples.▼
end /*k*/ /* [↑] Note: SD could be zero. */
/*stick a fork in it, we're done. */</lang>
▲'''output''' appears identical to the output for '''Icon and Unicon''', '''Mathematica''', and '''R''' examples.
=={{header|Ring}}==
|