Texas Instruments TI89 Developer Guide - Page 711
Lists and Matrices, Math, EStackIndex
![]() |
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 711 highlights
Appendix A: System Routines - Lists and Matrices 669 all_tail Declaration: Boolean all_tail (Boolean (* bool_fun) (EStackIndex), EStackIndex i) Category(ies): Lists and Matrices, Math Description: Determines whether the bool_fun returns TRUE for each expression in the tail of expressions indexed by i. Inputs: bool_fun - A Boolean function that takes the index of an expression as its one argument. i - Index of a tail. Outputs: Returns TRUE if bool_fun returns TRUE for each expression in the tail of expressions indexed by i. Otherwise returns FALSE. Assumptions: None Side Effects: None Availability: On AMS 1.05 and higher. TI-89 / TI-92 Plus Differences: None See Also: any_tail, map_tail, did_map_aggregate_arg Example: Boolean is_constant (EStackIndex i) /* Returns TRUE if the expression indexed by i is free of all variables. See also the slightly different function likely_approx_to_number. Otherwise returns FALSE. */ { for (;;) if (IS_NUM_VAR_OR_ZERO_ARG_TAG (ESTACK (i))) return (! IS_VARIABLE_TAG (ESTACK (i))); else if (IS_ONE_ARG_TAG (ESTACK (i))) --i; /* Loop to check the one argument */ else if (IS_TWO_ARG_TAG (ESTACK (i))) if (is_constant (--i)) i=next_expression_index(i); /* Loop to check 2nd arg */ else return FALSE; else { if (USER_FUN_TAG == ESTACK (i--)) i = next_expression_index (i); /* Skip function name */ return all_tail (is_constant, i); } } TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001
![](/manual_guide/products/texas-instruments-ti89-developer-guide-95b636f/711.png)