Macaulay2 » Documentation
Packages » Macaulay2Doc :: value(Pseudocode)
next | previous | forward | backward | up | index | toc

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/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;
ii3 : value current
/usr/local/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

Ways to use this method: