Opened 9 years ago

Closed 5 years ago

#560 closed proposed feature (not a bug)

restore options after running example

Reported by: kroeker@… Owned by: somebody
Priority: minor Milestone: 4-1-0 and higher
Component: dontKnow Version: 4-0-0
Keywords: restore options example Cc:

Description

It seems that after running an example, options are not restored and this is not due to a bug in option handling. Example:

option();
option("warn") ;
LIB("ehv.lib");
 example primdecEHV;
option();

the corresponding output is:

> option();
//options: redefine loadLib usage prompt warn
> option("warn") ;
> LIB("ehv.lib");
>  example primdecEHV;
// proc primdecEHV from lib ehv.lib
EXAMPLE:
  ring  r = 0,(x,y,z),dp;
  poly  p = z2+1;
  poly  q = z3+2;
  ideal i = p*q^2,y-z2;
  list pr = primdecEHV(i);
  pr;

      _[1]=z2-y
      _[2]=y4+y3+4y2z+4yz+4y+4

      _[2]=y2z+yz+2y+2
      _[3]=y3+y2+2yz+2z

> option();
//options: redTail redThrough intStrategy redefine loadLib usage prompt warn

Proposal: restore options after an example was run.

Change History (2)

comment:1 Changed 9 years ago by kroeker@…

examples should not modify the Singular environment at all.

Currently it is possible to modify printlevel options and maybe other settings in example code.

comment:2 Changed 5 years ago by hannes

Resolution: not a bug
Status: newclosed
Note: See TracTickets for help on using tickets.