Menu

#1233 DISPLAY bug

GC 3.2
open
nobody
None
5 - default
2026-06-18
2026-06-18
No

Folowing program demonstrates a display bug.
A workaround is also included in the source code.

More information at:
https://sourceforge.net/p/gnucobol/discussion/contrib/thread/cd6cd08558/?limit=50#23c0/d306/beda/84ea

       >>SOURCE FREE
REPLACE ==:BCO:== by ==background-color== ==:FCO:== by ==foreground-color==.
ID DIVISION.
PROGRAM-ID. TESTBUG2.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 Black              constant as 00.
01 COLOR-MAPPING-DATA.
   05  COLOR-STRING   pic X(7) value "3166254".
01 COLOR-MAP-ARRAY    REDEFINES COLOR-MAPPING-DATA.
   05 PIECE-COLOR     pic 9 occurs 7.
   05 PIECE-STATISTICS.
      07 STAT-COUNTERS     pic 9(3) occurs 7 value 0.
      07 STAT-COUNTERS-TOT pic 9(3) value 0.
SCREEN SECTION. 
01 GAME-UI.              
    *> dummy line as workaround for proper display of L-Tetramino in statistics
    *> uncomment following line and line 22 will be displayed
    *> 05 line 07 col 01 value " " :BCO: PIECE-COLOR(3) :FCO: Black.   
    05 line 09 col 04 value "----------------".
    05 line 10 col 17 pic ZZ9 from STAT-COUNTERS(3).
    05 line 10 col 04 value "[][][]" :BCO: PIECE-COLOR(3) :FCO: Black. *> this line is not displayed. BUG !!!
    05 line 11 col 04 value "[]"     :BCO: PIECE-COLOR(3) :FCO: Black.
PROCEDURE DIVISION.
    display GAME-UI 
    Accept omitted
    STOP RUN. 

Discussion


Log in to post a comment.

Auth0 Logo