Static variable in Openedge / Progress

RealHeavyDude

Well-Known Member
Given that you are running at least OpenEdge 10.1A and you are using classes ( often referred to as OOABL ) - yes you can ...


Heavy Regards, RealHeavyDude.
 

RealHeavyDude

Well-Known Member
Too fast ....
CLASS pds.common.Test:

/*********************************************************************************/
/* Data members */
/*********************************************************************************/

DEFINE PUBLIC STATIC VARIABLE myVariable AS CHARACTER NO-UNDO.

/*********************************************************************************/
/* Constructor & Desctructor */
/*********************************************************************************/

CONSTRUCTOR PUBLIC Test ( ):

END CONSTRUCTOR.

DESTRUCTOR PUBLIC Test ( ):

END DESTRUCTOR.

/*********************************************************************************/
/* Method implementations */
/*********************************************************************************/

END CLASS.

Heavy Regards, RealHeavyDude.
 

j4n

Member
Is it possible to define a static variable in OpenEdge like we do in C?

Thanks
Joel

are you referring to c or c++?
progress doesn't have "c-static"-variables. you would have to use smth like shared variables that reside in a different p-file.
if you want static class members like in c++ - then yes. it is like RHD said.
 
Top