Ticket #46: test.sing

File test.sing, 964 bytes (added by Oleksandr , 14 years ago)

test source

Line 
1proc getRingWithVar()
2{
3  ring T = 0,(t),dp;  ideal B = maxideal(2); 
4
5  export B; //!!! ok here!!!
6  return(T);
7}
8
9proc BugHere(def T)
10{
11  "mapPower";
12
13  def save = basering;
14
15  "/-------T----------"; listvar(T); "/////////////////";
16
17  setring T;
18  "ring T:", T;
19
20  "/-------T----------"; listvar(T); "/////////////////";
21
22
23  listvar();
24 
25  "Defined(A)?: ", defined(A); 
26  B;
27  A; 
28 
29  return(1);
30}
31
32proc Test()
33{
34  def save = basering;
35
36  def T = getRingWithVar(); setring T;
37
38  ideal A = B;
39
40  if(Export == 1)
41  {
42    export A; //??? Why ?????
43  }
44
45  "Temporary Source Ring", T;
46  "S^k(Source Basis)", A;
47
48  listvar();
49  "/-------Tn----------"; listvar(T); "/////////////////";
50
51  setring save; 
52
53  listvar();
54  "/-------T----------"; listvar(T); "/////////////////";
55
56  setring T;
57  A;
58  B; // still here after all these setrings...
59
60  setring save; 
61
62  return(BugHere(T));
63}
64
65
66
67// "main"
68ring r;
69int Export  = 1;
70Test();
71
72
73int Export  = 0;
74Test();
75
76
77$