Texas Instruments TI89 Developer Guide - Page 713
Lists and Matrices, Math, Variables, lst_name
![]() |
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 713 highlights
Appendix A: System Routines - Lists and Matrices 671 cmd_sorta Declaration: void cmd_sorta (EStackIndex lst_name) Category(ies): Lists and Matrices, Math, Variables Description: Sorts in ascending order the list named by lst_name and stores the result back in the same list. Inputs: lst_name - Indexes the name of a list to sort. Outputs: None Assumptions: None Side Effects: May expand expression stack, cause heap compression, or throw an error. Availability: On AMS 1.05 and higher. TI-89 / TI-92 Plus Differences: None See Also: cmd_sortd Example: This example creates a list in L4. Note that this by-passes the normal routines to tokenize symbol names (TokenizeName or TokenizeSymName) which should normally be used. The list is then sorted both in ascending and then descending order. EStackIndex vName; push_quantum( END_TAG ); /* executing commands requires this */ push_zstr( "l4" ); /* pushes STR_DATA_TAG also */ vName = top_estack - 1; /* names do not need STR_DATA_TAG so skip it */ push_quantum(END_TAG); push_Float(2.0); push_Float(-5.1); push_Float(8.0); push_quantum(LIST_TAG); VarStore( vName, STOF_ESI, 0, top_estack ); cmd_sorta( vName ); cmd_sortd( vName ); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001
![](/manual_guide/products/texas-instruments-ti89-developer-guide-95b636f/713.png)