Try OpenEdge Now
skip to main content
Object-oriented Programming
Object-oriented Programming and ABL : Overview of object-oriented programming : Inheritance : Comparison with procedure-based programming
 
Comparison with procedure-based programming
You can also define a form of inheritance with procedure objects using super procedures. A set of related super procedures can act in much the same way as a class hierarchy. One internal procedure can invoke another internal procedure of the same name in its super procedure with the RUN SUPER statement, or similarly for user-defined functions using the SUPER built-in function. The key difference between the use of super procedures and a class hierarchy is that the super procedures are related only at run time. ABL has no way to anticipate or validate the interactions between the procedures, and must search the procedure stack to determine if a "super" version of a procedure exists, and where. By contrast, the compiler can validate every reference from one class to another in the same hierarchy, which can then be established reliably at run time.