Appendix A: System Routines — Lists and Matrices
703
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
push_newlist
Declaration:
void
push_newlist
(EStackIndex
len_index
)
Category(ies):
Lists and Matrices
Description:
Pushes onto the estack a list of zeros.
Inputs:
len_index
— Indexes the number of elements in the new list.
Outputs:
None
Assumptions:
None
Side Effects:
May expand expression stack, cause heap compression, or throw an error.
Availability:
On AMS 2.00 and higher.
TI-89 / TI-92 Plus
Differences:
None
See Also: push_newmat, push_randmat
Example:
This example creates a 10-element list of zeros named L2. It then stores to
L2[1] and L2[11]. Note that
VarStore
can be used to increase a list by at
most one element.
BYTE lName[] = {0,'l','2',0};
/* create a list of 10 zeros on the estack */
push_ushort_to_integer( 10 );
push_newlist( top_estack );
/* Store list created with push_newlist to 'L2' */
VarStore( lName+3, STOF_ESI, 0, top_estack );
/* Store 123 to L2[1] */
push_ushort_to_integer( 123 );
VarStore( lName+3, STOF_ELEMENT, 0, top_estack, 1u, 0 );
/* Store 1234567890 to L2[11] */
push_ulong_to_integer( 1234567890l );
VarStore( lName+3, STOF_ELEMENT, 0, top_estack, 11u, 0 );