PROGRAM-NAME function
Returns the name of the calling program.
Syntax
n
ExampleThis procedure returns the names of any procedure(s) that called it, and displays the number of levels that the procedure was nested:
Notes
- If you execute a procedure directly from the Procedure Editor or the User Interface Builder, then PROGRAM-NAME(1) returns the name of a temporary file rather than the name of the actual procedure file.
- The PROGRAM-NAME function is useful when developing on-line help. For example, you can use the following code in your help routine to produce a program trace:
- If the procedure you reference is an internal procedure, then PROGRAM-NAME returns a string with the following form:
- If the procedure you reference is a user interface trigger associated with a widget, then PROGRAM-NAME returns a string with the following form:
- If the procedure you reference is a user interface trigger that uses the ANYWHERE keyword, then PROGRAM-NAME returns a string with the following form:
- If the procedure you reference is a session database trigger, then PROGRAM-NAME returns a string with the following form:
Wheretype
is either ASSIGN, CREATE, DELETE, FIND, or WRITE.- If the call stack contains a method reference, then PROGRAM-NAME returns a string with the following form:
Whereclass-file-name
is the name of the class definition (.cls
) file in whichmethod-name
is implemented.
OpenEdge Release 10.2B
|