This is documentation for Mathematica 7, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Stack

Stack[]
shows the current evaluation stack, giving a list of the tags associated with evaluations that are currently being done.
Stack[pattern]
gives a list of expressions currently being evaluated which match the pattern.
  • Stack[_] shows all expressions currently being evaluated.
  • You can call Stack from inside a dialog to see how the dialog was reached.
  • In the list returned by Stack[pattern], each expression is wrapped with HoldForm.
Print the stack where the Stack command is being evaluated:
Print the detailed stack contents including function arguments:
Print the stack where the Stack command is being evaluated:
 
Print the detailed stack contents including function arguments:
Use Stack inside of Dialog to see how it was reached:
Stack shows that the dialog from 2*Dialog[] is entered first:
Upon return from the first dialog, the other is entered:
New in 2