Microsoft KB Archive/45481

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 19:23, 12 August 2020 by X010 (talk | contribs) (X010 moved page Microsoft KB Archive/Q45481 to Microsoft KB Archive/45481 without leaving a redirect: Text replacement - "Microsoft KB Archive/Q" to "Microsoft KB Archive/")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

The information in this article applies to:
- Microsoft COBOL for MS-DOS, versions 3.0 and 3.0a

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.