next | previous | forward | backward | up | top | index | toc | home
Macaulay2 > The Macaulay2 language > operators > .

. -- access to elements whose key is a symbol

Description

x.k -- the same as x#(global k), i.e., treat k as a global symbol and provide the value stored in the hash table x under the key k.

May also be used in an assignment.

i1 : x = new MutableHashTable;
i2 : x.k = 444

o2 = 444
i3 : x.k

o3 = 444
i4 : peek x

o4 = MutableHashTable{k => 444}

See also

For the programmer

The object . is a keyword.