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.