Difference between revisions of "PROCNAME()"

From Recital Documentation Wiki
Jump to: navigation, search
(Class)
(Description)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
 
 
==Purpose==
 
==Purpose==
 
Function to return name of currently executing procedure
 
Function to return name of currently executing procedure
Line 14: Line 12:
  
 
==Description==
 
==Description==
The PROCNAME() function returns the name of the currently executing program or procedure.  This function is useful when used with the SET KEY TO command or ON ERROR routines.  The PROCNAME() function always returns a character string in lower case.  If a program is currently being executed , the ".prg" for program or ".dbo" for compiled program will be returned with the name of the program.  Otherwise if a procedure or user defined function (UDF) is being executed, only the name will be returned.
+
The PROCNAME() function returns the name of the currently executing program or procedure.  This function is useful when used with the SET KEY TO command or ON ERROR routines.  The PROCNAME() function returns a character string in upper case.  If a program is currently being executed, the ".PRG" for program or ".DBO" for compiled program will be returned with the name of the program.  Otherwise if a procedure or user defined function (UDF) is being executed, only the name will be returned.
  
 
<expN>
 
<expN>
 
Specifying the optional <expN> causes PROCNAME() to return the name of the procedure or program at the <expN> level.  If there is no program or procedure at the specified level, an empty string is returned.  The name of the master or starting program is returned if <expN> is 0 or 1.
 
Specifying the optional <expN> causes PROCNAME() to return the name of the procedure or program at the <expN> level.  If there is no program or procedure at the specified level, an empty string is returned.  The name of the master or starting program is returned if <expN> is 0 or 1.
 
  
 
==Example==
 
==Example==
Line 28: Line 25:
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital, Recital Server
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]

Latest revision as of 11:59, 12 January 2023

Purpose

Function to return name of currently executing procedure


Syntax

PROCNAME([<expN>])


See Also

DEBUG, DO, MESSAGE, RESUME, SUSPEND, DOLEVEL(), MESSAGE(), PATH(), PROCLIBS(), PROCLINE(), SYS(), SET DEBUG, SET DOHISTORY, SET ECHO, SET HISTORY


Description

The PROCNAME() function returns the name of the currently executing program or procedure. This function is useful when used with the SET KEY TO command or ON ERROR routines. The PROCNAME() function returns a character string in upper case. If a program is currently being executed, the ".PRG" for program or ".DBO" for compiled program will be returned with the name of the program. Otherwise if a procedure or user defined function (UDF) is being executed, only the name will be returned.

<expN> Specifying the optional <expN> causes PROCNAME() to return the name of the procedure or program at the <expN> level. If there is no program or procedure at the specified level, an empty string is returned. The name of the master or starting program is returned if <expN> is 0 or 1.

Example

m_procname = procname()
dialog message "The error occurred in the procedure &m_procname."


Products

Recital, Recital Server