Terminal control/Coloured text: Difference between revisions

Content deleted Content added
Puppydrum64 (talk | contribs)
Petelomax (talk | contribs)
m →‎{{header|Forth}}: fixed </LANG> tag
Line 634:
=={{header|Forth}}==
ANS/ISO Forth does not specify how screen color is handled. This demonstration creates a set of commands for an ANSI terminal that give the programmer control of text color.
<LANGlang FORTH>( ANSI terminal control lexicon Colored Text)
DECIMAL
( support routines)
Line 654:
: TEXT ( color ) 30 + ATTR ; ( use: YELLOW TEXT )
: BACKGROUND ( color ) 40 + ATTR ; ( use: BLUE BACKGROUND )
</LANGlang>
With the code loaded into Forth, color control is a part of the language
<lang forth>WHITE TEXT BLUE BACKGROUND ok
BLUE TEXT BOLD ATTR ok
CYAN TEXT ok</LANGlang>
 
=={{header|Fortran}}==