next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc :: value(Pseudocode)

value(Pseudocode) -- execute pseudocode

Synopsis

Description

Here is an example of its use in the debugger, to see whether modifying the value of a local variable fixed the problem in the code, by executing just the offending line.

i1 : load "Macaulay2Doc/demo1.m2"
i2 : 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;
ii3 : value current
/usr/share/Macaulay2/Macaulay2Doc/demo1.m2:8:12:(3): error: division by zero
ii4 : x = 11

oo4 = 11
ii5 : value current

       1
oo5 = --
      11

oo5 : QQ

See also