Consultor Eletrônico



Kbase P84043: Error 247 or 198 because undefined argument/preprocessor leaves ?}? if not followed by space
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   16/06/2004
Status: Unverified

FACT(s) (Environment):

Progress 9

FACT(s) (Environment):

Progress 8

SYMPTOM(s):

** Unable to understand after -- "<string>". (247)

** <program> Could not understand line <number>. (198)

Any compile time error

undefined argument

undefined preprocessor

CAUSE:

The compiler has problems to handle an undefined argument/preprocessor and leaves a curly bracket ('}') if it is not followed by a space or a carriage return. Development is aware of it.
Example:
/*test.p*/
DEFINE VARIABLE c AS CHARACTER NO-UNDO.
c = &IF "{&DataType}":U = "LOGICAL" &THEN NO &ELSE {&DataType}('') &ENDIF.
If you do a COMPILE test.p PREPROCESS test.txt, and open test.txt, you will see it results in:
c = }(??).

FIX:

Either add a space after the braces (works fine with this example):
c = &IF "{&DataType}":U = "LOGICAL" &THEN NO &ELSE {&DataType} ('') &ENDIF.Or use the DEFINED() preprocessor function (when an extra space is not an option):
c = &IF "{&DataType}":U = "LOGICAL" &THEN NO &ELSE &IF DEFINED(DataType) = 0 &THEN ('') &ELSE {&DataType}('') &ENDIF &ENDIF.