Read-only forum archive

ring delaration

ring delaration

lkastner · Mon Dec 03, 2012 11:54 pm

I have a ring called r and want to create a copy of this ring, but with a different characteristic. Is there some working alternative to
Code:
int newchar = 5;
ring r = newchar,(varstr(r)),dp;

?

Thanks,
Lars

Re: ring delaration

malex · Tue Dec 04, 2012 9:36 pm

Hi,

you can try using
Code:
list L = ringlist(r);
and change the field component (L[1]) with it coming from a ring with appropriate field. Afterwards create a new ring out of it, e.g. with
Code:
def NEW = ring(L); setring NEW;


Cheers,
Oleksandr