Try OpenEdge Now
skip to main content
Object-oriented Programming
Programming with Class-based and Procedure Objects : Referencing routines on the call stack
 

Referencing routines on the call stack

The PROGRAM-NAME built-in function returns the name of a routine on the call stack. It takes an integer argument that indicates the level of the call stack to be return. If the argument is 1, the name of the current routine is returned. If it is 2, the name of the calling routine is returned. If there is no calling routine, the application is at the top of the call stack and the AVM returns the Unknown value (?).
If a position on the call stack contains a method reference, PROGRAM-NAME returns a string in the following syntax:
"method-nameclass-file-name"
Element descriptions for this syntax diagram follow:
method-name
The calling method.
class-file-name
The class file where the calling method is implemented.