Invoke behavior in super procedures
- Last Updated: August 4, 2023
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
The ABL interpreter effectively adds the contents of the super procedures to the name space of the procedure that added it. Therefore, you can invoke the internal procedures and functions defined in a super procedure simply by referencing them as if they were actually implemented in the other procedure. The interpreter locates the routine and executes it.
|
If the internal procedure takes any parameters (INPUT,
OUTPUT, or INPUT-OUTPUT) it must pass the same
parameter types to its super procedure in the RUN SUPER statement. Note
that these parameter values do not have to be the same. You might want to change the
parameter values before invoking the behavior in the next version of the internal
procedure, depending on your application logic.
|
This invokes the same function name in the super procedure and passes any parameters to
it just as an internal procedure RUN SUPER statement does. The
SUPER() expression returns from the super procedure whatever value
and data type the function itself returns.
Each super procedure in turn can invoke the next implementation of that same routine up
the stack by using the same SUPER syntax.
You must place a RUN SUPER statement inside an implementation of the
invoked internal procedure and you must use exactly the same calling sequence. You can
place any other ABL definitions or executable code before or after the
SUPER reference. This placement lets you invoke the inherited
behavior before, after, or somewhere in the middle of the local specialization of the
routine.