Microsoft KB Archive/45481

How to Get High-Intensity Colors to Display

PSS ID Number: Q45481 Article last modified on 04-20-1993

3.00 3.00a MS-DOS

Summary: Because FOREGROUND-COLOR allows only color values from 0 through 7, you must use a combination of FOREGROUND-COLOR (or FOREGROUND-COLOUR) and HIGHLIGHT to display the high-intensity colors 8 through 15. You can specify a screen attribute for a DISPLAY statement, a whole screen, or an individual data description within a screen. The screen attributes are discussed in Chapter 15 of the “Microsoft COBOL Compiler Version 3.0: Language Reference Manual.” The FOREGROUND-COLOR attribute is discussed on Page 15-22, and the HIGHLIGHT attribute is discussed on Page 15-26.

More Information: The following code segment displays high-intensity colors for each of the three descriptions: WORKING-STORAGE SECTION. SCREEN SECTION. * color attribute on a individual item of a screen. 01 screen-1. 05 blank screen. 05 line 01 column 10 highlight value “High intensity colour” foreground-colour 4. * color attribute on the whole screen. 01 screen-2 highlight foreground-colour 6. 05 line 03 column 10 value “More high intensity colour”. PROCEDURE DIVISION. display screen-1. display screen-2. * attribute set on an individual display statement display “also high intensity colour” at line 05 column 10 with highlight foreground-colour is 3. STOP RUN.

Additional reference words: 3.00 3.00a Copyright Microsoft Corporation 1993.