I am writing a small procedure. I am defining a ring inside the procedure (depending upon the parameter to the proc). The some computations are done and then procedure returns objects in this ring. Here is a sample code:
Code:
LIB "ring.lib";
int p = 7; // primality of p or prime power is checked beforehand.
proc mytest( int n )
{
ring Qz = (0,z),x,dp;
minpoly = rootofUnity( n );
poly i = z^(n-1);
return (i);
}
ring dummy;
mytest(7);
I am getting the following
message:
Quote:
? ring change during procedure call test: dummy -> Qz (level 1)
I also tried with `export Qz`, just before return, but doesnt help. Any solution?
Not sure if this is relevant: It seems the command `
test` is already defined!!!
Code:
> test(4);
// ** Gerhard, use the option command
>
-- VInay