[Main]
Name=index_main_var
Type=Function
Subtype=ROM Call
Header Files=estack.h
Definition=ESI index_main_var (CESI ptr);
Attributes=__attribute__((__pure__))
MinAMS=1.01

[ROM Call]
Index=$2CF

[Description]
Searches an expression for a first encountered variable.

[Explanation]
index_main_var returns the index of the first encountered variable in the expression
pointed to by <I>ptr</I>. More precise, it repeatedly decreases value of <I>ptr</I> by one
until the tag of a variable, a number or a symbolic constant (like <B>pi</B>) is
reached. As expressions are usually organized in "internal canonic" form (see notes given with
description of <A HREF="$$LINK(estack.h/numeric_factor_index)">numeric_factor_index</A>) in which all
constants are always "below" variables on the stack, a variable will always be reached
before any constant, except if there are not any variables in the expression
(in this case, a pointer to a constant is returned). Obviously, this function is not
reliable if the expression is not in the internal canonic form
(see <A HREF="$$LINK(estack.h/push_internal_simplify)">push_internal_simplify</A>).

[References]
In=basfunc.h/did_push_anti_deriv, basfunc.h/push_1st_derivative, basfunc.h/push_csolve, basfunc.h/push_czeros, basfunc.h/push_def_int, basfunc.h/push_desolve, basfunc.h/push_expand, basfunc.h/push_factor, basfunc.h/push_lim, basfunc.h/push_max, basfunc.h/push_min, basfunc.h/push_nsolve, basfunc.h/push_solve, basfunc.h/push_zeros, basop.h/push_equals, basop.h/push_greater_than, basop.h/push_greater_than_or_equals, basop.h/push_less_than, basop.h/push_less_than_or_equals, basop.h/push_not_equals, unknown.h/get_ub, unknown.h/replace_top_with_post_simplified
Out=unknown.h/primary_tag_list
