COLOR

The COLOR attribute displays field text in a color or with other video attributes, either unconditionally, or only if a Boolean expression is TRUE.

4GLREF00000037.gif

field-tag is the field tag that you declared in the SCREEN section.

display mode is one of the keywords to specify a color or an intensity. You can specify zero or one color, and zero or more intensities.

If you do not use the WHERE keyword to specify a 4GL Boolean expression, then the intensity and/or color in your display mode list applies to the field.

Boolean Expressions in 4GL Form Specification Files

This is the syntax of 4GL Boolean expressions in the WHERE clause of a COLOR attribute specification.

4GLREF00000038.gif

char is a single ASCII character, enclosed between a pair of single ( ' ) or double ( " ) quotation marks.

character is one or more literal or special characters, enclosed between two single ( ' ) or double ( " ) quotation marks

field tag is the field tag of the current field.

In this diagram, terms for other 4GL expressions are restricted subsets. Except for the constants TRUE and FALSE, you cannot reference the name of a program variable or constant in the WHERE clause of a COLOR attribute specification. You can, however, include a field tag or a literal value wherever the name of a variable can appear in a 4GL expression that is a component of the 4GL Boolean expression.

If any component of the 4GL Boolean expression is NULL, then the value of the entire 4GL Boolean expression is FALSE (rather than NULL), unless the IS NULL keywords are also included in the expression. Applying the NOT operator to a NULL value does not change its FALSE evaluation.

Related Attributes

AUTONEXT
INCLUDE
REVERSE
COMMENTS
INVISIBLE
UPSHIFT
DEFAULT
NOENTRY
VALIDATE LIKE
DISPLAY LIKE
PICTURE
VERIFY
DOWNSHIFT
PROGRAM
WORDWRAP
FORMAT
REQUIRED