System.CallDepth - Manhunter07/MFL GitHub Wiki

Declaration

function CallDepth: System.PosInt = \built-in\

Description

The CallDepth function in the System package returns the current outside-itself function call depth at the moment of evaluation. It is 0 if called from outside a function and 1 or greater if called from inside.

You may use the Caller function helper to get the caller function (or Nil) of the current function.