Consultor Eletrônico



Kbase P110782: 4GL: Error (578) using COLOR statement.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/11/2005
Status: Unverified

SYMPTOM(s):

4GL: Error (578) using COLOR DISPLAY statement.

** @ phrase only allowed in a DISPLAY statement. (578)

** Could not understand line 25. (196)

Executing the code:
DEFINE VARIABLE iCounter AS INTEGER NO-UNDO.
DEFINE VARIABLE iExtent AS INTEGER NO-UNDO.
DEFINE VARIABLE cArray AS CHARACTER EXTENT 3 NO-UNDO.
FORM
cArray[iExtent] AT 1
WITH SCROLL 1
OVERLAY
10 DOWN
ROW 1
COLUMN 10
NO-LABELS
NO-HIDE
WIDTH 40
COLOR blk/cyan
TITLE COLOR wht/blk " Select a Driver "
WITH FRAME f-drivers.
ASSIGN
cArray[1] = "Excluded Driver - Jacky Humfrey"
cArray[2] = "Peter Yankin"
cArray[3] = "James Goodman".
.
DO iCounter = 1 TO 3:
DISPLAY cArray[iCounter] @ cArray[iExtent] WITH FRAME f-drivers DOWN.
IF cArray[iCounter] BEGINS "Exc" THEN
COLOR DISPLAY red/yellow cArray[iCounter] @ cArray[iExtent] WITH FRAME f-drivers DOWN.
DOWN WITH FRAME f-drivers.
END.


CAUSE:

This is a syntax error. The COLOR statement does not allow the use of the @ phrase. The @ phrase is allowed only with the DISPLAY statement which should not be confused with the DISPLAY option of the COLOR statement.

FIX:

Correct the syntax of the COLOR statement by changing the offending statement:
COLOR DISPLAY red/yellow cArray[iCounter] @ cArray[iExtent] WITH FRAME f-drivers DOWN.
to
COLOR DISPLAY red/yellow cArray[iExtent] WITH FRAME f-drivers DOWN.