|
5.2.8 keepring
Syntax:
keepring name ;
Purpose:
- moves the specified ring to the next (upper) level. This command can only
be used inside of procedures and it should be the last command before the
return statement. There it provides the possibility to keep
a ring which is local to the procedure (and its objects) accessible after
the procedure ended without making the ring global.
Example:
| proc P1
{
ring r=0,x,dp;
keepring r;
}
proc P2
{
"inside P2: " + nameof(basering);
P1();
"inside P2, after call of P1: " + nameof(basering);
}
ring r1= 0,y,dp;
P2();
==> inside P2: r1
==> inside P2, after call of P1: r
"at top level: " + nameof(basering);
==> at top level: r1
|
See
ring.
|