next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Macaulay2Doc > The Macaulay2 language > variables > viewing the symbols defined so far

viewing the symbols defined so far

After using Macaulay2 for a while, you may have stored data in several variables. The system also stores output values for you in output variables. You may wish to free the memory space occupied by that data, or you may simply wish to remind yourself where you stored a previously computed value.

We may use the command listUserSymbols to obtain a list of the user's symbols encountered so far.

i1 : ff = 20:4; h = true; kk

o3 = kk

o3 : Symbol
i4 : listUserSymbols

o4 = symbol   class       value                                                   location of symbol
     ------   -----       -----                                                   ------------------     
     h      : Boolean  -- true                                                    currentString:1:12-1:13
     ff     : Sequence -- (4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,. currentString:1:1-1:3  
The symbols are listed in chronological order, and the type of value stored under it is displayed.

We can clear the output symbols with clearOutput.

i5 : clearOutput
i6 : listUserSymbols

o6 = symbol   class       value                                                   location of symbol
     ------   -----       -----                                                   ------------------     
     h      : Boolean  -- true                                                    currentString:1:12-1:13
     ff     : Sequence -- (4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,. currentString:1:1-1:3  
We can clear all the symbols with clearAll.
i7 : clearAll
i8 : listUserSymbols

o8 = symbol  class  value location of symbol
     ------  -----  ----- ------------------