WOLFRAM

Copy to clipboard.
Symbol["name"]

refers to a symbol with the specified name.

Details

  • All symbols, whether explicitly entered using Symbol or not, have head Symbol.
  • x_Symbol can be used as a pattern to represent any symbol.
  • The string "name" in Symbol["name"] must be an appropriate name for a symbol. It can contain any letters, letterlike forms, or digits, but cannot start with a digit.
  • Symbol["name"] creates a new symbol if none exists with the specified name.
  • A symbol such as x has a name "x".
  • If Symbol["name"] creates a new symbol, it does so in the context specified by $Context.

Examples

open allclose all

Basic Examples  (1)Summary of the most common use cases

Out[1]=1
Out[2]=2

Scope  (4)Survey of the scope of standard use cases

Use Symbol to create new symbols in a program:

Out[1]=1

Use Symbol for pattern matching:

Out[1]=1

Create a symbol in a given context:

Out[1]=1
Out[2]=2

Create a symbol in the current context:

Out[1]=1

Applications  (1)Sample problems that can be solved with this function

Create several symbols in a program:

Out[1]=1

Properties & Relations  (9)Properties of the function, and connections to other functions

Symbol creates new symbols in the current context:

Out[1]=1
Out[2]=2
Out[3]=3

Unique creates symbols with a unique new name:

Out[1]=1
Out[2]=2

Module creates new temporary symbols every time it is evaluated:

Out[1]=1

Symbol and SymbolName are inverses of each other:

Out[1]=1

Many functions of symbols also accept symbol names as arguments:

Out[1]=1

Context gives the context of a symbol:

Out[1]=1

Possible symbol names can be characterized by regular expressions:

Out[1]=1

Symbol resolves context aliases:

Out[1]=1

LocalSymbol and CloudSymbol provide for persistent storage of values:

Out[3]=3

Possible Issues  (1)Common pitfalls and unexpected behavior

The name must satisfy the syntax for symbol names:

Out[1]=1
Wolfram Research (1988), Symbol, Wolfram Language function, https://reference.wolfram.com/language/ref/Symbol.html (updated 1996).
Copy to clipboard.
Wolfram Research (1988), Symbol, Wolfram Language function, https://reference.wolfram.com/language/ref/Symbol.html (updated 1996).

Text

Wolfram Research (1988), Symbol, Wolfram Language function, https://reference.wolfram.com/language/ref/Symbol.html (updated 1996).

Copy to clipboard.
Wolfram Research (1988), Symbol, Wolfram Language function, https://reference.wolfram.com/language/ref/Symbol.html (updated 1996).

CMS

Wolfram Language. 1988. "Symbol." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 1996. https://reference.wolfram.com/language/ref/Symbol.html.

Copy to clipboard.
Wolfram Language. 1988. "Symbol." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 1996. https://reference.wolfram.com/language/ref/Symbol.html.

APA

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

Copy to clipboard.
Wolfram Language. (1988). Symbol. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Symbol.html

BibTeX

@misc{reference.wolfram_2024_symbol, author="Wolfram Research", title="{Symbol}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/Symbol.html}", note=[Accessed: 09-January-2025 ]}

Copy to clipboard.
@misc{reference.wolfram_2024_symbol, author="Wolfram Research", title="{Symbol}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/Symbol.html}", note=[Accessed: 09-January-2025 ]}

BibLaTeX

@online{reference.wolfram_2024_symbol, organization={Wolfram Research}, title={Symbol}, year={1996}, url={https://reference.wolfram.com/language/ref/Symbol.html}, note=[Accessed: 09-January-2025 ]}

Copy to clipboard.
@online{reference.wolfram_2024_symbol, organization={Wolfram Research}, title={Symbol}, year={1996}, url={https://reference.wolfram.com/language/ref/Symbol.html}, note=[Accessed: 09-January-2025 ]}