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
|
This usage works only in the debugger, where current has a non-null value.
i7 : load "Macaulay2Doc/demo1.m2" |
i8 : g 2
/usr/share/Macaulay2/Macaulay2Doc/demo1.m2:8:12:(3):[2]: error: division by zero
/usr/share/Macaulay2/Macaulay2Doc/demo1.m2:8:12:(3):[2]: --entering debugger (type help to see debugger commands)
/usr/share/Macaulay2/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" /usr/share/Macaulay2/Macaulay2Doc/demo1.m2:7:6-7:7
b : Nothing -- null /usr/share/Macaulay2/Macaulay2Doc/demo1.m2:8:6-8:7
x : ZZ -- 0 /usr/share/Macaulay2/Macaulay2Doc/demo1.m2:6:6-6:7
f : FunctionClosure -- ... /usr/share/Macaulay2/Macaulay2Doc/demo1.m2:6:1-6:2
|
ii10 : h := x -> y -> y+1; |
ii11 : listLocalSymbols(ZZ,h 11)
oo11 = symbol class value location of symbol
------ ----- ----- ------------------
x : ZZ -- 0 /usr/share/Macaulay2/Macaulay2Doc/demo1.m2:6:6-6:7
x : ZZ -- 11 stdio:2:6-2:7
|
This usage works only in the debugger, where current has a non-null value.
ii12 : load "Macaulay2Doc/demo1.m2" |
ii13 : g 2
/usr/share/Macaulay2/Macaulay2Doc/demo1.m2:8:12:(3):[2]: error: division by zero
/usr/share/Macaulay2/Macaulay2Doc/demo1.m2:8:12:(3):[2]: --entering debugger (type help to see debugger commands)
/usr/share/Macaulay2/Macaulay2Doc/demo1.m2:8:11-8:13: --source code:
b := 1/x;
|
iii14 : listLocalSymbols ZZ
ooo14 = symbol class value location of symbol
------ ----- ----- ------------------
x : ZZ -- 0 /usr/share/Macaulay2/Macaulay2Doc/demo1.m2:6:6-6:7
|
The object listLocalSymbols is a command.