Kbase P156631: Error 196 when compiling a class referencing .NET class in OpenEdge Architect.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  30/11/2009 |
|
Status: Unverified
SYMPTOM(s):
Error 196 when compiling a class referencing .NET class in OpenEdge Architect.
** <program> Could not understand line <number>. (196)
Compile fails when the line before is commented out, but succeeds when it is uncommented.
Once file can compile successfully, it will continue to compile for the rest of the Architect session, but will fail in a new Architect session.
FACT(s) (Environment):
Many .NET object and class names are in all lower case.
Compile succeeds when the line with the error is retyped using the correct case.
Windows
OpenEdge 10.2A
CAUSE:
.NET languages are generally case sensitive with respect to all names and identifiers used in the language. However, because ABL is generally not case sensitive, it minimizes the need to respect case sensitivity when programming with .NET objects. Thus, ABL requires that each qualified and unqualified .NET type name be specified using the correct letter case on the first reference only. After that, type names can be specified using any letter case.
In this particular case, the line that was commented out referred to an object of a particular class. The line that followed referred to the class name directly as part of a fully qualified reference to a different member (an enumeration). As long as the line before was commented out, the class name in the next line was the first use of that type. Because the name was specified in all lower case, the compiler could not recognize it.
However, when the commented-out line was uncommented, the compiler needed to use the class to resolve the object reference. Therefore, the next line was not the first use of the class, so the fact that it was specified in all lower case did not matter and the code compiled successfully.
FIX:
Use the correct case the first time each .NET object or class is referenced.