up previous next
Using

perform commands in non-active ring
Syntax

Using R Do C EndUsing

where R is the identifier for a ring and C is a sequence of commands.


Description
Suppose S is the current ring and R is another ring, then
  Using R Do
    C;
  EndUsing;
is equivalent to
  Use R;
  C;
  Use S;


Example
  Use S ::= QQ[x,y];          -- the current ring is S
  R ::= QQ[a,b,c];            -- another ring
  Using R Do Indets(); EndUsing;
[a, b, c]
-------------------------------
Note: Using QQ[a,b] Do ... EndUsing; will produce an error: you need to name the polynomial ring.

See Also