Appendix A: System Routines — Logic
727
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
and_onto_top
Declaration:
void
and_onto_top
(EStackIndex
i
)
Category(ies):
Logic
Description:
Replaces the top expression with the internally-simplified logical “and” of it
with the expression indexed by
i
.
Inputs:
i
— Index of the top tag of a Boolean expression.
Outputs:
None
Assumptions: top_estack
indexes the top tag of a Boolean expression.
Side Effects:
None
Availability:
On AMS 2.02 and higher.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: push_and, replace_top2_with_and
Example:
void push_but_conjunct_factor (EStackIndex i, EStackIndex j)
/* i indexes a (perhaps degenerate) conjunct and j indexes one of its
remaining Boolean factors.
Pushes onto the estack the conjunct without the lead factor of j.
*/
{ if (i == j)
push_expression (remaining_conjuncts_index (i));
else
{ push_but_conjunct_factor (remaining_conjuncts_index (i), j);
and_onto_top (lead_conjunct_factor_index (i));
}
}