Difference between revisions of "PROGRAM()"
From Lianjapedia
Yvonne.milne (Talk | contribs) |
Yvonne.milne (Talk | contribs) |
||
Line 9: | Line 9: | ||
==Description== | ==Description== | ||
− | The PROGRAM() function returns the name of the currently executing program or procedure. | + | The PROGRAM() function returns the name of the currently executing program or procedure. The name is returned as a character string in upper case without path or file extension. |
<expN> | <expN> | ||
Line 17: | Line 17: | ||
<code lang="recital"> | <code lang="recital"> | ||
m_program = program() | m_program = program() | ||
− | + | messagebox("The error occurred in the program; &m_program.") | |
</code> | </code> | ||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] |
Latest revision as of 08:34, 30 May 2013
Contents
Purpose
Function to return the currently executing program name
Syntax
PROGRAM([<expN>])
See Also
DO, FUNCTION, PROCEDURE, DOLEVEL(), LINENO(), PATH(), PROCLIBS(), PROCLINE(), PROCNAME(), SYS()
Description
The PROGRAM() function returns the name of the currently executing program or procedure. The name is returned as a character string in upper case without path or file extension.
<expN> Specifying the optional <expN> causes PROGRAM() 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_program = program() messagebox("The error occurred in the program; &m_program.")