remaining_element_count Function (ROM Call 0x3C3)

AMS 1.01 or higher estack.h

unsigned short remaining_element_count (CESI start_ptr);

Returns number of elements remaining.

remaining_element_count counts how many expressions are stored on the expressions stack below the expression pointed to by ptr (including this one). END_TAG is treated as the terminator, so eventual expressions below END_TAG are not counted. So, if ptr points to an element of the list, remaining_element_count returns the number of elements in the list starting from this element up to the end of the list.

remaining_element_count works using repeated calling next_expression_index and increasing a counter until END_TAG is reached.


Uses: next_expression_index
Used by: RemainingArgCnt, cmd_fill, cmd_newdata, cmd_send, cmd_sinreg, cmd_sorta, cmd_sortd, did_push_anti_deriv, push_1st_derivative, push_augment, push_coldim, push_cross_product, push_csolve, push_czeros, push_def_int, push_desolve, push_determinant, push_dimension, push_dotproduct, push_factor, push_left, push_lim, push_list_to_mat, push_max, push_mean, push_mid, push_min, push_nsolve, push_red_row_ech, push_right, push_rotate, push_row_echelon, push_rowdim, push_shift, push_simult, push_solve, push_stddev, push_unitv, push_variance, push_zeros, push_equals, push_greater_than, push_greater_than_or_equals, push_less_than, push_less_than_or_equals, push_list_plus, push_not_equals, is_matrix, is_square_matrix, is_valid_smap_aggregate, get_list_indices, get_matrix_indices, get_ub, GetStatValue, push_float_qr_fact, push_lu_fact, push_sq_matrix_to_whole_number, push_symbolic_qr_fact, push_user_func, replace_top_with_post_simplified, spike_geo_titles, spike_optionD, VarRecall, ROM Call 0x494, ROM Call 0x495