Progress
Language Reference
PROGRAM-NAME Function
Returns the name of the calling program.
SYNTAX
n
The numeric argument. If n is 1, the name of the current program is returned. If n is 2, the name of the calling program is returned. If there is no calling program then you have reached the top of the call stack and Progress returns the unknown value (?).
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.
Where type is either ASSIGN, CREATE, DELETE, FIND, or WRITE.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |