PreviousNextIndex

PROGRAM-NAME function

Returns the name of the calling program.

Syntax

PROGRAM-NAME( n ) 

n
Example

This procedure returns the names of any procedure(s) that called it, and displays the number of levels that the procedure was nested:

r-prgnm.p
/* Note this program should be run as a subroutine. */ 
/* The deeper the nesting, the better the illustration. */ 
DEFINE VARIABLE level AS INTEGER NO-UNDO INITIAL 1. 
REPEAT WHILE PROGRAM-NAME(level) <> ?: 
  DISPLAY LEVEL PROGRAM-NAME(level) FORMAT "x(30)". 
  level = level + 1. 
END. 

Notes

OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex