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

current -- the pseudocode that produced an error

Synopsis

Description

Use value to evaluate the code again, for debugging purposes.
i1 : load "Macaulay2Doc/demo1.m2"
i2 : code g

o2 = /usr/local/share/Macaulay2/Macaulay2Doc/demo1.m2:
     11:6-14:7: --source code:
     g = y -> (
          c := f(y-1);
          d := f(y-2);
          c+d)
i3 : 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;
ii4 : code current

oo4 = /usr/local/share/Macaulay2/Macaulay2Doc/demo1.m2
      :8:10-8:12: --source code:
           b := 1/x;
ii5 : disassemble current

oo5 = (2-OP / 1 (fetch 0 0))
ii6 : value current
/usr/local/share/Macaulay2/Macaulay2Doc/demo1.m2:8:12:(3): error: division by zero
ii7 : x = 11

oo7 = 11
ii8 : value current

       1
oo8 = --
      11

oo8 : QQ
ii9 : continue

     34
o9 = --
     11

o9 : QQ

For the programmer

The object current is null.