next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc :: getSymbol

getSymbol -- make a global user symbol from a string

Synopsis

Description

i1 : x = "aaaa"

o1 = aaaa
i2 : s = getSymbol x

o2 = aaaa

o2 : Symbol
i3 : dictionary s

o3 = User#"private dictionary"

o3 : GlobalDictionary
i4 : s === getSymbol x

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

o5 = {aaaa, x, s}

o5 : List

Caveat

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