# getGlobalSymbol -- create a global symbol in a global dictionary

## Synopsis

• Usage:
getGlobalSymbol(dict,nam)
getGlobalSymbol nam
• Inputs:
• Outputs:
• a global symbol in the dictionary dict whose name is the string nam, which will be created, if necessary
• Consequences:
• if a new symbol is created, it is stored under the name nam in the dictionary dict

## Description

If dict is omitted, then the first symbol found in the dictionaries listed in dictionaryPath will be returned. If none is found, one will be created in the first dictionary listed in dictionaryPath, unless it is not mutable, in which case an error will be signalled; perhaps that behavior should be changed.

 i1 : d = new Dictionary o1 = d o1 : GlobalDictionary i2 : sym = getGlobalSymbol(d,"foo") o2 = foo o2 : Symbol i3 : d o3 = d o3 : GlobalDictionary i4 : peek d o4 = GlobalDictionary{"foo" => foo} i5 : d#"foo" === sym o5 = true i6 : d#"asfd" = sym o6 = foo o6 : Symbol i7 : peek d o7 = GlobalDictionary{"asfd" => foo} "foo" => foo

## For the programmer

The object getGlobalSymbol is .