Consultor Eletrônico



Kbase P120233: Compiler errors when using include file in class
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/10/2010
Status: Unverified

SYMPTOM(s):

Compiler errors when using include file in class

Using existing include file also used in procedure files

Include file contains generic code

Include file added in code after CLASS statement

Include file contains code other than static definitions and forward declarations

One of the following errors occurs:

In a CLASS, all executable statements must be in methods. (12983)

Procedures and user-defined functions may not be defined in a class or interface file. (12910)

FACT(s) (Environment):

OpenEdge 10.1x
OpenEdge 10.2x
All Supported Operating Systems

CAUSE:

This is expected behavior.

Classes follow more strict rules regarding what code may be placed where, and the include file does not adhere to these rules.

FIX:

At the very least, the include file needs to be restructured so the code contained within confirms to the stricter rules for classes.

A better approach would be to create a new class based on the functionality provided in the include file, and have the other classes inherit that.