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

getSymbol -- make a global user symbol from a string



i1 : x = "aaaa"

o1 = aaaa
i2 : s = getSymbol x

o2 = aaaa

o2 : Symbol
i3 : dictionary s

o3 = GlobalDictionary{...3...}

o3 : GlobalDictionary
i4 : s === getSymbol x

o4 = true
i5 : keys User#"private dictionary"

o5 = {aaaa, x, s}

o5 : List


The old behavior, up to version 1.3.1, was to provide a previously existing global symbol, if one exists and is visible in one of the dictionaries in dictionaryPath, or, if not, to create a new global symbol in the first mutable dictionary listed in dictionaryPath.

See also

For the programmer

The object getSymbol is a function closure.