Kbase P112060: Syntax error using ASSIGN when instantiating new class
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  21/11/2006 |
|
Status: Unverified
FACT(s) (Environment):
OpenEdge 10.1x
SYMPTOM(s):
Syntax error using ASSIGN when instantiating new class
** Unable to understand after -- "<string>". (247)
** Unable to understand after -- "clClassA = NEW ClassA". (247)
CAUSE:
This is expected behavior as syntax analyzer does not allow for this construct.
FIX:
This is expected behavior.
The ASSIGN statement and the NEW statement even though they look syntactically similar, they are actually two different type of statements. ASSIGN is usually used when assigning certain value or a result of an expression to the variable on the left side of the statement, however the object instantiation is more than that, as it creates an object instance of a class and then assigns that object reference to a class type variable.