Returns the full path name of the caller SPL routine.
__CALLERFILE__
// ctest.spl
ctest(x)
{
return(ctest_div(x));
}
ctest_div(x)
{
local str;
if (argc < 1) x = 1;
if (x == 0)
{
str = sprintf(strescape(
message(str);
return;
}
return(1/x);
}
ctest(0)
displays the message:
Divide by 0
File: ctest.spl
Function: ctest_div
Caller: \myspl\ctest.spl
__CALLERFILE__ returns the full path name of the caller of an SPL routine. An empty string is returned if there is no caller.
See __CALLERFILENAME__ to return the file name portion of the full SPL path.