Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>ntocolor()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 NTOCOLOR()
 Converts a numeric value into a color value in the NN/NN or CC/CC form
------------------------------------------------------------------------------
 Syntax

     NTOCOLOR(<nAttr>, [<lColorCode>]) --> cAttr

 Arguments

     <nAttr>   Designates the value for the combined numeric color
     attributes.

     <lColorCode>  If designated as .F. or if the parameter is omitted,
     NTOCOLOR() returns a string with a numeric color code.  When designated
     as .T., NTOCOLOR() returns a string with the CA-Clipper alpha color
     coding.

 Returns

     NTOCOLOR() returns the designated color attribute in the NN/NN or CC/CC
     form.

 Description

     NTOCOLOR() converts a color attribute returned from another function in
     numeric form, into the alphanumeric data format.  Use this attribute in
     conjunction with the CA-Clipper SET COLOR TO command.

 Notes

     .  NTOCOLOR() returns a null string if the specified attributes
        are invalid or unavailable attributes.  Acceptable values are in the
        range of 0 and 255.

     .  You cannot specify color attributes in letter format (e.g.,
        "B/W") .

 Examples

     .  Normal display (white on black):

        ? NTOCOLOR(7)                 // 07/00
        ? NTOCOLOR(7, .T.)            // W/N

     .  Display red on white.  The numeric form 116 yields "04/07":

        ? NTOCOLOR(116)               // 04/07
        ? NTOCOLOR(116)               // R/W

     .  An invalid parameter returns a null string:

        ? NTOCOLOR(380)               // ""
        ? NTOCOLOR(-1)                // ""


See Also: COLORTON()

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