Anonymous user
Terminal control/Coloured text: Difference between revisions
m
→PC/REXX or Personal REXX: consolidated ("overlaid") code with a comment box to save program statements. -- ~~~~
(moved ooRexx to its own section. -- ~~~~) |
m (→PC/REXX or Personal REXX: consolidated ("overlaid") code with a comment box to save program statements. -- ~~~~) |
||
Line 317:
<br><br>The program displays 16 lines, each of a different color with text stating the color of the text.
<br>(The black text, of course, is essentiall invisible as the background is also black.)
<lang rexx>/*
if \!pcrexx then exit /*if this isn't PC/REXX, exit. */
color.0 = 'black' /*┌─────────────────────────────┐*/
▲if \!dos & \!os2 then exit /*if this isn't DOS, then exit. */
color.2 = 'dark green' /*│ the (above) error messages │*/
color.3 = 'dark
color.4 = 'dark red' /*│ ($ERR)
color.5 = 'dark
color.6 = 'dark yellow (orange)' /*│ and issues the error text in│*/▼
color.7 = 'dark white' /*│ red (if color is available).│*/
color.8 = 'brite black (grey/gray)' /*└─────────────────────────────┘*/
▲color.6 = 'dark yellow (orange)'
color.9 = 'bright blue'
color.10 = 'bright green'
Line 343 ⟶ 338:
color.15 = 'bright white'
do j=0 to 15
call scrwrite ,,'color code=['right(j,2)"]" color.j,,,j; say
end
exit /*stick a fork in it, we're done.*/
Line 355 ⟶ 350:
!rex:parse upper version !ver !vernum !verdate .;!brexx='BY'==!vernum;!kexx='KEXX'==!ver;!pcrexx='REXX/PERSONAL'==!ver|'REXX/PC'==!ver;!r4='REXX-R4'==!ver;!regina='REXX-REGINA'==left(!ver,11);!roo='REXX-ROO'==!ver;call !env;return
!sys:!cms=!sys=='CMS';!os2=!sys=='OS2';!tso=!sys=='TSO'|!sys=='MVS';!vse=!sys=='VSE';!dos=pos('DOS',!sys)\==0|pos('WIN',!sys)\==0|!sys=='CMD';call !rex;return
!var:call !fid;if !kexx then return space(dosenv(arg(1)));return space(value(arg(1),,!env))
=={{header|Tcl}}==
|