FUNCTIONS CORE

IsDefColor()

Check if the default color is set

Syntax

Signature
IsDefColor( ) --> lIsDefaultColor

Example

IsDefColor.prg
#if OS_LINUX
   REQUEST GTXWC
#else
   REQUEST GTWVT
#endif

PROCEDURE Main()

   LOCAL cDefault := SetColor()

   Check( 'IsDefColor()                     ', IsDefColor(), .T. )

   SetColor( "W+/B,N/W" )
   Check( 'IsDefColor() after SetColor()    ', IsDefColor(), .F. )

   SetColor( cDefault )
   Check( 'IsDefColor() after restoring     ', IsDefColor(), .T. )

   Inkey( 0 )

RETURN

STATIC PROCEDURE Check( cTitle, xResult, xExpected )

   QOut( cTitle + IIF( xResult == xExpected, "OK", "ERROR" ) )

RETURN

Output