Valid names for symbols may be constructed using letters, digits, and the apostrophe, and should not begin with a digit.
i1 : x
o1 = x
o1 : Symbol
|
i2 : q0r55
o2 = q0r55
o2 : Symbol
|
i3 : f'
o3 = f'
o3 : Symbol
|
Some symbols have preassigned meanings and values. For example, symbols consisting of the letter
o followed by a number are used to store output values.
i4 : o2
o4 = q0r55
o4 : Symbol
|
Other symbols refer to functions built into Macaulay 2 that provide much of its functionality.
Sometimes, one wants the symbol, rather than the particular value it happens to have at the moment. For example after setting the value of
x to 5, the value of the variable
x is no longer the symbol
x. Use
symbol to recover the symbol itself.
i5 : x=5
o5 = 5
|
i6 : x
o6 = 5
|
i7 : symbol x
o7 = x
o7 : Symbol
|