Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - colorcode() convert color string to color code http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 colorcode()         Convert color string to color code
------------------------------------------------------------------------------
 Declaration
   color.hdr

 Syntax
   func int colorcode extern
   param const char cColor

 Arguments
   cColor is the color string to convert.

 Return
   The color attribute corresponding to the passed string.

 Description
   The colorcode() function converts a dBase-type color string to a numeric
   color attribute value, as defined in color.hdr.

 Example
   #define EXAMPLE_SCREEN
   #include example.hdr

   proc Test_colorcode
   ? colorcode( "n/w" )                     // prints 112 (0x70)
   ? colorcode( "n/w" )  == WHITE_BLACK     // prints .t.
   ? colorcode( "N/W" )  == WHITE_BLACK     // prints .t.
   ? colorcode( "BG/N" ) == BLACK_CYAN      // prints .t.
   endproc

   proc main
   Test_colorcode()
   endproc

See Also: set color to setcolorto()

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