currentname

currentname returns the most recently resolved name whose contents is still under execution. currentname is useful for error handling purposes where a procedure has to know the name with which it has been called. Example:

Note: This function is not foolproof, as it will fail for bound procedures.

currentname evaluates certain debugging information on the execution stack. Note that the SLI interpreter can be compiled not to generate this information. In this case currentname fails, i.e. it will always return false