Top
Back: 5.1.111 resultant
Forward: 5.1.113 setring
FastBack: 5. Functions and system variables
FastForward: 6. Tricks and pitfalls
Up: 5.1 Functions
Top: Singular 2-0-4 Manual
Contents: Table of Contents
Index: F. Index
About: About This Document

5.1.112 rvar

Syntax:

rvar ( name )
rvar ( poly_expression )
rvar ( string_expression )

Type:

int

Purpose:

returns the number of the variable if the name is a ring variable of the basering or if the string is the name of a ring variable of the basering; returns 0 if not. Hence the return value of rvar can also be used in a boolean context to check whether the variable exists.

Example:
 
  ring r=29,(x,y,z),lp;
  rvar(x);
→ 1
  rvar(r);
→ 0
  rvar(y);
→ 2
  rvar(var(3));
→ 3
  rvar("x");
→ 1

See defined; ring; var; varstr.


Top Back: 5.1.111 resultant Forward: 5.1.113 setring FastBack: 5. Functions and system variables FastForward: 6. Tricks and pitfalls Up: 5.1 Functions Top: Singular 2-0-4 Manual Contents: Table of Contents Index: F. Index About: About This Document
            User manual for Singular version 2-0-4, October 2002, generated by texi2html.