$FUNCNAME$
  PROCNAME()
$CATEGORY$
  SYSTEM,MISCELLANEOUS,INFO
$SUMMARY$
   Return the name of the current or previous procedure or user-defined function
$LANG_RU$
          
$SYNTAX$
     PROCNAME([<nActivation>]) --> cProcedureName
$LANG_RU$
     PROCNAME([< >]) -->  
$ARGUMENTS$
     <nActivation> specifies which activation to query.  A value of zero
     refers to the current activation, a value of one refers to the previous
     activation, etc.  If unspecified, the default value is zero.
$LANG_RU$
     < > ,    . 
         ,  1 -    ..
        ,     - .
$RETURNS$
     PROCNAME() returns the name of a currently executing procedure,
     function, or code block, as a character string.
$LANG_RU$
     PROCNAME()   ,    ,
            .
$DESCRIPTION$
     PROCNAME() queries the xClipper activation stack to determine the name
     of a currently executing procedure, user-defined function, or code
     block.  The activation stack is an internal structure that maintains a
     record of each procedure, function, or code block invocation.

     For the current activation, PROCNAME() returns the name of the current
     procedure or user-defined function.  For a previous activation,
     PROCNAME() returns the name of the procedure or user-defined function
     that invoked the current procedure.

     If the activation being queried is a code block evaluation, PROCNAME()
     returns the name of the procedure or user-defined function that defined
     the code block, preceded by "b".  If the activation being queried is a
     memvar, PROCNAME() returns the name preceded by "M->".

     PROCNAME() is used with PROCLINE() to report debugging information.
$LANG_RU$
     PROCNAME()     xClipper  
          ,  
       .    -   ,
          ,    .

        PROCNAME()     
      .    PROCNAME() 
         ,   .

          ,  PROCNAME() 
         ,    
     .

     PROCNAME()      PROCLINE()  
      .
$EXAMPLES$
       This example is a user-defined function you can call during a
	debugging phase of program development in order to display the
	activation stack with line numbers:

	FUNCTION ListStack( cMessage )
	   LOCAL nActivation := 1
	   ? cMessage
	   DO WHILE !(PROCNAME(nActivation) == "")
	      ? "Called from:", PROCNAME(nActivation),;
		 "(" + LTRIM(STR(PROCLINE(nActivation))) + ")"
	      nActivation++
	   ENDDO
	   QUIT
	   RETURN NIL
$LANG_RU$
          ,   
               
          :

       FUNCTION ListStack( cMessage )
	  LOCAL nActivation := 1
	  ? cMessage
	  DO WHILE !(PROCNAME(nActivation) == "")
	     ? "  :", PROCNAME(nActivation),;
	     "(" + LTRIM(STR(PROCLINE(nActivation))) +")"
	     nActivation++
	  ENDDO
	  QUIT
	  RETURN NIL
$SEEALSO$
  PROCLINE()
$END$
