$NewSymbol

$NewSymbol

is a global variable which, if set, is applied to the name and context of each new symbol that the Wolfram Language creates.

Details

  • The name and context of the symbol are given as strings.
  • $NewSymbol is applied before the symbol is actually created. If the action of $NewSymbol causes the symbol to be created, perhaps in a different context, then the symbol as created will be the one used.
  • $NewSymbol is applied even if a symbol has already been created with a Stub attribute by DeclarePackage.
  • $NewSymbol is not applied to symbols automatically created by scoping constructs such as Module.

Examples

Basic Examples  (1)

Set $NewSymbol to a function that prints the name and context when a new symbol is created:

Restore $NewSymbol to its default:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2024_$newsymbol, author="Wolfram Research", title="{$NewSymbol}", year="1991", howpublished="\url{https://reference.wolfram.com/language/ref/$NewSymbol.html}", note=[Accessed: 21-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_$newsymbol, organization={Wolfram Research}, title={$NewSymbol}, year={1991}, url={https://reference.wolfram.com/language/ref/$NewSymbol.html}, note=[Accessed: 21-December-2024 ]}