|
D.15.2.7 varNum
Procedure from library arr.lib (see arr_lib).
- Usage:
- varnum(string s);
varnum(ring_variable);
- Return:
- [int] number of given ring variable, or 0 if it does not appear
- Note:
- This procedure has the same functionality as varNum from the dmod.lib
package, but also accepts polys as input.
Example:
| LIB "arr.lib";
ring R = 0,(x,y,z),dp;
varNum(y);
==> 2
ring S = 0,(x(1..5),y(1..5)),dp;
varNum("y(3)");
==> 8
| See also:
arrLastVar;
arrSwapVar;
varMat;
varNum.
|