Try OpenEdge Now
skip to main content
ABL Reference
ABL Syntax Reference : SUPER statement
 

SUPER statement

Invokes a constructor for the immediate super class as the first statement in a constructor of the defining class.

Syntax

SUPER ( [ parameter [ , parameter ] ... ] )
( [ parameter [ , parameter ] ... ] )
Specifies zero or more parameters passed to a PROTECTED or PUBLIC constructor that is defined for the super class. You must provide the parameters identified by the specified constructor, matched with respect to number, data type, and mode. To invoke a constructor that is overloaded in the class, you must specify sufficient information for each parameter to disambiguate it from all other constructors in the class. Otherwise, ABL raises an error identifying the ambiguity.
For information on the parameter passing syntax and disambiguating overloaded constructors, see the Parameter passing syntax reference entry.

Notes

*You can invoke this statement only as the first executable statement in a constructor of a class. If there is no constructor defined in the immediate super class or there is a constructor defined that does not take parameters, you do not need to explicitly invoke this statement in constructors of the defining class. By default, ABL implicitly invokes either the built-in default constructor or any constructor defined in the super class without parameters when the defining class is instantiated. You only need to explicitly invoke a super class constructor if it is defined with parameters.
*If all of the constructors defined for the super class take parameters, the first executable statement of at least one overloaded constructor in the defining class must explicitly invoke a super class constructor.
*Any PUBLIC constructor for a class must either invoke a constructor in the immediate super class (implicitly, or explicitly using the SUPER statement), or it must call another constructor defined in the same class (using the THIS-OBJECT statement). This other constructor must also invoke either a super class constructor or call another constructor defined in the same class. The last constructor in any chain of constructors called in the same class must always call a super class constructor (again, implicitly or explicitly).

See also

CONSTRUCTOR statement, Parameter passing syntax, THIS-OBJECT statement, SUPER system reference