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>invertattr()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
INVERTATTR()

Syntax:     INVERTATTR(<attr>)

Arguments:  <attr> denotes the attribute to be processed.

Returns:    A numeric value.
            The value of the inverted attribute.

Usage:      INVERTATTR() returns a value corresponding to the inverse
            of an individual screen attribute.  This is equivalent to an
            exchange of the foreground with the background colors.  A
            red script on a white background will become a white script
            on a red background.

            It can be used in conjunction with functions like
            SCREENATTR(), COLORWIN() or COLORREPL().

Notes:      The flashing and high intensity attributes will not be affected.
            The result will always be numeric, regardless of the data
            type of the arguments.

Library:    CT1.LIB


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

Examples:   * Print the reverse of the attribute at the
            * actual cursor position.
            INVERTATTR(SCREENATTR())

            * The attribute may be indicated in different
            * ways.  The return value, on the other hand,
            * will always be numeric.
            ? INVERTATTR(19)                    && Result: 49
            ? INVERTATTR(112)                   && Result: 7
            ? INVERTATTR("/7")                  && Result: 7
            ? INVERTATTR("7")                   && Result: 112
            ? INVERTATTR("GR+/U)                && Result: 120
            ? INVERTATTR("U/GR+")               && Result: 30

            * An invalid attribute.
            ? INVERTATTR("XX/YY")               && Result: 0



See Also: NTOCOLOR() SCREENATTR()

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