Arbortext Command Language > Functions by Alphabetical Listing > caller_line
  
caller_line
caller_line ([level])
This function returns the line number of the statement that called this routine. If the argument level is given, it specifies the number of call frames to go back before the current function to obtain the line number of the calling function. For example, caller_line(1) returns the line number of the call to the active function, whose name is returned by caller(0).
The caller, caller_line and caller_file functions can be used to generate a function trace back of the active ACL stack frame.
Example
function show_callers()
{
local n = 0;
while (caller_line(n)) {
local c = caller(n);
if (c == "") {
c = "*top-level*";
}
eval "Caller[" . n . "] is " . c output=>*;
eval " at line", caller_line(n), "file", caller_file(n) output=>*
n++;
}
}
Related Topics
caller function
caller_file function
package_name function