MatchLocalNames

MatchLocalNames

is an option for Trace and related functions that specifies whether symbols such as x should match symbols with local names of the form x$nnn.

Details

  • The default setting is MatchLocalNames->True.
  • With the default setting, Trace[expr,x=rhs] will show assignments to local variables whose names are of the form x$nnn.
  • Trace[expr,x=rhs,MatchLocalNames->False] shows assignments only for the global symbol x.

Examples

Basic Examples  (1)

By default, Trace will match local variables:

With MatchLocalNames->False, only an explicit match of x will show up:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2023_matchlocalnames, author="Wolfram Research", title="{MatchLocalNames}", year="1991", howpublished="\url{https://reference.wolfram.com/language/ref/MatchLocalNames.html}", note=[Accessed: 19-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_matchlocalnames, organization={Wolfram Research}, title={MatchLocalNames}, year={1991}, url={https://reference.wolfram.com/language/ref/MatchLocalNames.html}, note=[Accessed: 19-March-2024 ]}