System.CallStack - Manhunter07/MFL GitHub Wiki
function CallStack: array = \built-in\
The CallStack
function in the System
package returns the current outside-itself function call stack at the moment of evaluation. It is an empty array ([]
) if called from outside a function and contains the full call stack as a [reference] array if called from inside. The stack order is from the outside to the inside with the most recent call last. Each object from the call stack is returned as a reference inside the returned array (if possible, otherwise Nil
is returned) with the exception of the CallStack
function itself which is left out.
You may use the Caller
function helper to get the caller function (or Nil
) of the current function.