WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

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.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
See Also
Tech Notes
Related Guides
Related Workflows
History
Cite this Page

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.

Details

  • 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 .
  • The maximum length of Stack [] is limited by $RecursionLimit .
  • Stack has attribute HoldFirst .

Examples

open all close all

Basic Examples  (2)

Print the stack where the Stack command is being evaluated:

Print the detailed stack contents including function arguments:

Scope  (1)

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:

Tech Notes

Related Workflows

History

Introduced in 1991 (2.0)

Wolfram Research (1991), Stack, Wolfram Language function, https://reference.wolfram.com/language/ref/Stack.html.

Text

Wolfram Research (1991), Stack, Wolfram Language function, https://reference.wolfram.com/language/ref/Stack.html.

CMS

Wolfram Language. 1991. "Stack." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Stack.html.

APA

Wolfram Language. (1991). Stack. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Stack.html

BibTeX

@misc{reference.wolfram_2025_stack, author="Wolfram Research", title="{Stack}", year="1991", howpublished="\url{https://reference.wolfram.com/language/ref/Stack.html}", note=[Accessed: 05-December-2025]}

BibLaTeX

@online{reference.wolfram_2025_stack, organization={Wolfram Research}, title={Stack}, year={1991}, url={https://reference.wolfram.com/language/ref/Stack.html}, note=[Accessed: 05-December-2025]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /