[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+--------------+###########################################################
#+-| SET COLOR TO |---------------------------------------+###################
#| +--------------+ The SET COLOR TO command controls the |###################
#| color and attributes of the console. |###################
#+--------------------------------------------------------+###################
##############################################################################
##############################################################################
#+--| Syntax |-----------------------------------------+######################
#| SET COLOR TO [<C-exp> [,<C-exp>[,<C-exp>]]] |######################
#+-----------------------------------------------------+######################
##############################################################################
##############################################################################
####+---| Description |---------------------------------------------------+###
####| SET COLOR TO is used to set the color and attributes of the console |###
####| by using the character values shown in the COLOR TYPE TABLE. |###
####| |###
####| ################################################################ |###
####| #+--------------------| COLOR TYPE TABLE |---------------------+ |###
####| #| CODE USAGE CODE USAGE | |###
####| #| | |###
####| #| B Blue R Red | |###
####| #| BG Cyan W White | |###
####| #| G Green X Blank | |###
####| #| GR Brown * Blinking | |###
####| #| GR+ Yellow + High Intensity | |###
####| #| N Black U Underline | |###
####| #| RB Magenta I Inverse Video | |###
####| #| | |###
####| #| Codes U and I apply only to monochrome monitors. | |###
####| +--------------------------------------------------------------+ |###
####| |###
####| The first expression sets the color for standard input and output |###
####| through the ?, INPUT, ACCEPT, and @...SAY commands. The second |###
####| expression sets the color for enhanced input and output through |###
####| the @...GET command. The third expression sets the color of the |###
####| border surrounding the display area of the screen. The first two |###
####| expressions consist of a color code for the foreground and a color |###
####| code for the background separated by a slash(/). |###
####| The border has only one color code |###
####| ------------------------------------------------------------------- |###
####| If SET COLOR TO is specified without any <C-expN> expressions it |###
####| resets the colors to their default values. |###
####| ------------------------------------------------------------------- |###
####| You may set the colors directly through the __color_std and |###
####| __color_enhcd variables. These variables are set by the SET COLOR |###
####| TO command. Instead of using character strings, which must be |###
####| processed by the SET COLOR TO command, they accept interger values. |###
####| This results in MUCH smaller and faster code. |###
####| see colors.hdr for predefined color values. |###
####+---------------------------------------------------------------------+###
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Set monitor colors. |#########
#########| |#########
#########| ? "Hello" && Default color. |#########
#########| |#########
#########| SET COLOR TO "BG/N","R+/W","G" |#########
#########| |#########
#########| ? "Hello again" && Cyan on black. |#########
#########| |#########
#########| @ 10,10 GET sales->name && This field is |#########
#########| && intense red |#########
#########| && on white with |#########
#########| && a green border. |#########
#########| READ |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Set the colors from a configuration file. |#########
#########| |#########
#########| RESTORE scolor, ecolor FROM "config.y" |#########
#########| SET COLOR TO scolor, ecolor |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 3 |-------------------------------------------+#########
#########| * Set colors directly through the FORCE variables |#########
#########| * __color_std and __color_enhcd. |#########
#########| |#########
#########| #include data.hdr |#########
#########| |#########
#########| {...} |#########
#########| __color_std = &WHITE_BLUE |#########
#########| __color_enhcd = &WHITE_YELLOW |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
SET DELIMITERS
SET INTENSITY
__color_enhcd
__color_std
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson