next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc :: listLocalSymbols

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:1-1:2     
     y      : String -- "hi there" stdio:1:7-1:8     
     z      : ZZ     -- 1073741824 stdio:1:22-1:23   
i6 : listLocalSymbols symbol x

o6 = symbol   class     value      location of symbol
     ------   -----     -----      ------------------
     x      : ZZ     -- 3          stdio:1:1-1:2     
     y      : String -- "hi there" stdio:1:7-1:8     
     z      : ZZ     -- 1073741824 stdio:1:22-1:23   

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
/home2/dan/src/M2/M2/Macaulay2/packages/Macaulay2Doc/demo1.m2:8:12:(3):[2]: error: division by zero
/home2/dan/src/M2/M2/Macaulay2/packages/Macaulay2Doc/demo1.m2:8:12:(3):[2]: --entering debugger (type help to see debugger commands)
/home2/dan/src/M2/M2/Macaulay2/packages/Macaulay2Doc/demo1.m2:8:11-8:13: --source code:
     b := 1/x;
ii9 : listLocalSymbols

oo9 = symbol   class              value                                                   location of symbol
      ------   -----              -----                                                   ------------------                                                   
      a      : String          -- "hi there"                                              /home2/dan/src/M2/M2/Macaulay2/packages/Macaulay2Doc/demo1.m2:7:6-7:7
      b      : Nothing         -- null                                                    /home2/dan/src/M2/M2/Macaulay2/packages/Macaulay2Doc/demo1.m2:8:6-8:7
      x      : ZZ              -- 0                                                       /home2/dan/src/M2/M2/Macaulay2/packages/Macaulay2Doc/demo1.m2:6:6-6:7
      f      : FunctionClosure -- -*Function[/home2/dan/src/M2/M2/Macaulay2/packages/Mac. /home2/dan/src/M2/M2/Macaulay2/packages/Macaulay2Doc/demo1.m2:6:1-6:2

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     /home2/dan/src/M2/M2/Macaulay2/packages/Macaulay2Doc/demo1.m2:6:6-6:7
       x      : ZZ    -- 11    stdio:2:6-2:7                                                        

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
/home2/dan/src/M2/M2/Macaulay2/packages/Macaulay2Doc/demo1.m2:8:12:(3):[2]: error: division by zero
/home2/dan/src/M2/M2/Macaulay2/packages/Macaulay2Doc/demo1.m2:8:12:(3):[2]: --entering debugger (type help to see debugger commands)
/home2/dan/src/M2/M2/Macaulay2/packages/Macaulay2Doc/demo1.m2:8:11-8:13: --source code:
     b := 1/x;
iii14 : listLocalSymbols ZZ

ooo14 = symbol   class    value
        ------   -----    -----
        x      : ZZ    -- 0    
        ---------------------------------------------------------------------
        location of symbol
        ------------------                                                   
        /home2/dan/src/M2/M2/Macaulay2/packages/Macaulay2Doc/demo1.m2:6:6-6:7

For the programmer

The object listLocalSymbols is a command.