Macaulay2 » Documentation
Packages » Macaulay2Doc :: symbol
next | previous | forward | backward | up | index | toc

symbol -- get a symbol

Description

symbol s provides the symbol s, even if s currently has a value.

i1 : num

o1 = num

o1 : Symbol
i2 : num = 5

o2 = 5
i3 : num

o3 = 5
i4 : symbol num

o4 = num

o4 : Symbol

If s is an operator, then the corresponding symbol is provided. This symbol is used by the interpreter in constructing keys for methods associated to the symbol.
i5 : symbol +

o5 = +

o5 : Keyword

See also

For the programmer

The object symbol is a keyword.