Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Clipper Tools One Guide - <b>colorton()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
COLORTON()

Syntax:     COLORTON(<attr>)

Arguments:  <attr> is the alphanumeric color attribute to be converted,
            supplied in the form "nn/nn" or "cc/cc".

Returns:    A numeric value.
            The number corresponds to a combined numerical color
            attribute.

Usage:      COLOR TO (N)umeric.

            The function is intended to convert an alphanumeric color
            attribute of the form "nn/nn" or "cc/cc" into a combined
            numerical attribute.  These combined attribute values can be
            used in Clipper Tools One functions such as STRSCREEN(),
            SCREENMIX() and SCREENATTR(), and in the Clipper
            commands SAVE/RESTORE SCREEN.

            COLORTON() can be used to easily produce numerical
            attributes for the Clipper Tools One functions.

            For an invalid attribute string, COLORTON() will return the
            numerical attribute 0 (black on black) which is invisible.

Library:    CT1.LIB


--------------------------------- Example ------------------------------

Examples:   * Normal display (white on black).
            * The following alphanumeric forms produce 7.
            ? COLORTON("07")
            ? COLORTON("07/00")
            ? COLORTON("W/N")

            * Display red on white.
            * The numerical attribute is 116 for the
            * following alphanumerics.
            ? COLORTON("04/07")
            ? COLORTON("R/W")

            * If the foreground color is missing, 0
            * is assumed.  Here this  will correspond to the
            * inverse display.
            ? COLORTON("/7")

            * High intensity (+) and flashing (*) will
            * also be detected.
            ? COLORTON("BR+")
            ? COLORTON("BR+*")
            ? COLORTON("G/BR+*")
            ? COLORTON("+G*/BR")

            * An invalid argument will produce 0.
            ? COLORTON()

            * All argument types will be allowed for <attr> for COLORTON()
            * as well.  A numerical attribute will, of course, remain numeric.

            ? COLORTON(112)                     && Result: 112



See Also: NTOCOLOR()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson