[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+-----------+##############################################################
#+-| ISCOLOR() |--------------------------------------------+#################
#| +-----------+ Returns TRUE if monitor is a color monitor |#################
#+----------------------------------------------------------+#################
##############################################################################
##############################################################################
#+--| Summary |----------------+##############################################
#| #INCLUDE system.hdr |##############################################
#+-----------------------------+##############################################
##############################################################################
##############################################################################
#+--| Syntax |--------------------------------+###############################
#| FUNCTION LOGICAL iscolor PROTOTYPE |###############################
#+--------------------------------------------+###############################
##############################################################################
##############################################################################
################+---| Description |--------------------------+################
################| The iscolor() function returns TRUE if the |################
################| current output monitor is a color monitor. |################
################+--------------------------------------------+################
##############################################################################
##############################################################################
#########+---| Design |--------------------------------------------+##########
#########| This function uses data from the BIOS data area within |##########
#########| the computer's memory to determine whether the color |##########
#########| monitor is active or not. If you are not using a close |##########
#########| IBM compatible computer, this function might not work. |##########
#########+---------------------------------------------------------+##########
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Initialize color values for the @...PROMPT and GET |#########
#########| * commands and for the ??,? commands. |#########
#########| |#########
#########| IF iscolor() |#########
#########| SET COLOR TO "B/G","R/G" |#########
#########| ENDIF |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * The FORCE library routine uses the variables |#########
#########| * __color_std and __color_enhcd to store the values |#########
#########| * of the "standard" and "enhanced" colors. |#########
#########| * Modification of these variables directly, verses |#########
#########| * through the SET COLOR TO command, produces faster |#########
#########| * and smaller code. Color defines are in colors.hdr |#########
#########| |#########
#########| #include colors.hdr |#########
#########| |#########
#########| VARDEF EXTERN |#########
#########| BYTE color_std |#########
#########| BYTE color_enhcd |#########
#########| ENDDEF |#########
#########| |#########
#########| PROCEDURE force_main |#########
#########| __color_std = &BLUE_WHITE |#########
#########| __color_enhncd = &GREEN_WHITE |#########
#########| |#########
#########| *--- the above is identical to: |#########
#########| * (and MUCH faster...) |#########
#########| |#########
#########| SET COLOR TO "B/W","G/W" |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
__color_std
__color_enhcd
SET COLOR TO
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson