Macaulay2 » Documentation
Packages » Macaulay2Doc :: listLocalSymbols
next | previous | forward | backward | up | index | toc

listLocalSymbols -- display of local symbols and their values

Description

Synopsis

  • Usage:
    listLocalSymbols f
  • Inputs:
  • Outputs:
    • a net, a compact display of the symbols in the local dictionaries attached to the closure f, and their values
i1 : x:=3; y:="hi there"; z:=2^30; f = x->x;
i5 : listLocalSymbols f

o5 = symbol  class   value       location of symbol
     ------  -----   -----       ------------------
     x       ZZ      3           stdio:1:0-1:1     
     y       String  "hi there"  stdio:1:6-1:7     
     z       ZZ      1073741824  stdio:1:21-1:22   
i6 : listLocalSymbols symbol x

o6 = symbol  class   value       location of symbol
     ------  -----   -----       ------------------
     x       ZZ      3           stdio:1:0-1:1     
     y       String  "hi there"  stdio:1:6-1:7     
     z       ZZ      1073741824  stdio:1:21-1:22   

Synopsis

  • Usage:
    listLocalSymbols
  • Outputs:
    • a net, a compact display of the symbols in the local dictionaries attached to current

This usage works only in the debugger, where current has a non-null value.

i7 : load "Macaulay2Doc/demo1.m2"
i8 : g 2
/usr/local/share/Macaulay2/Macaulay2Doc/demo1.m2:8:12:(3):[2]: error: division by zero
/usr/local/share/Macaulay2/Macaulay2Doc/demo1.m2:8:12:(3):[2]: --entering debugger (type help to see debugger commands)
/usr/local/share/Macaulay2/Macaulay2Doc/demo1.m2:
8:10-8:12: --source code:
     b := 1/x;
ii9 : listLocalSymbols

oo9 = symbol  class            value                                                    location of symbol
      ------  -----            -----                                                    ------------------                                                                  
      a       String           "hi there"                                               /usr/local/share/Macaulay2/Macaulay2Doc/demo1.m2:7:5-7:6
      b       Nothing          null                                                     /usr/local/share/Macaulay2/Macaulay2Doc/demo1.m2:8:5-8:6
      x       ZZ               0                                                        /usr/local/share/Macaulay2/Macaulay2Doc/demo1.m2:6:5-6:6
      f       FunctionClosure  FunctionClosure[/home/m2user/src/macaulay2/M2/M2/Ma.  /usr/local/share/Macaulay2/Macaulay2Doc/demo1.m2:6:0-6:1

Synopsis

  • Usage:
    listLocalSymbols(X,f)
  • Inputs:
  • Outputs:
    • a net, a compact display of the symbols in the local dictionaries attached to the closure f, and their values, provided their values are instances of the type X
ii10 : h := x -> y -> y+1;
ii11 : listLocalSymbols(ZZ,h 11)

oo11 = symbol  class  value  location of symbol
       ------  -----  -----  ------------------                                                                  
       x       ZZ     0      /usr/local/share/Macaulay2/Macaulay2Doc/demo1.m2:6:5-6:6
       x       ZZ     11     stdio:7:5-7:6                                                                       

Synopsis

  • Usage:
    listLocalSymbols X
  • Outputs:
    • a net, a compact display of the symbols in the local dictionaries attached to current whose values have type X.

This usage works only in the debugger, where current has a non-null value.

ii12 : load "Macaulay2Doc/demo1.m2"
ii13 : g 2
/usr/local/share/Macaulay2/Macaulay2Doc/demo1.m2:8:12:(3):[2]: error: division by zero
/usr/local/share/Macaulay2/Macaulay2Doc/demo1.m2:8:12:(3):[2]: --entering debugger (type help to see debugger commands)
/usr/local/share/Macaulay2/Macaulay2Doc/demo1.m2:
8:10-8:12: --source code:
     b := 1/x;
iii14 : listLocalSymbols ZZ

ooo14 = symbol  class  value  location of symbol
        ------  -----  -----  ------------------                                                                  
        x       ZZ     0      /usr/local/share/Macaulay2/Macaulay2Doc/demo1.m2:6:5-6:6

For the programmer

The object listLocalSymbols is a command.