System.CallStack - Manhunter07/MFL GitHub Wiki

Declaration

function CallStack: array = \built-in\

Description

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.

Remarks

  • CallStack does not return a reference to itself when it is called
  • You may use the Caller function helper to get the caller function (or Nil) of the current function.

See also

⚠️ **GitHub.com Fallback** ⚠️