| cmd_sorta | Function (ROM Call 0x38E)

AMS 1.01 or higher | bascmd.h

void cmd_sorta (ESI SymName);

Executes TI-Basic 'SortA' command.

cmd_sorta sorts elements in a TI-Basic list variable in ascending order and stores the result back in the same list. The parameter SymName should point to the terminating zero byte or variable tag of the list variable name. It must be on the expression stack, so you cannot pass a result of the SYMSTR macro directly to cmd_sorta. Instead, if you want to sort the list variable named "foo", for example, you should do:

    push_expression (SYMSTR ("foo"));
    cmd_sorta (top_estack);

This function may cause heap compression and expansion of the expression stack.

Uses: HeapAllocHighThrow, HeapAllocThrow, HeapFree, HeapFreeIndir, HeapLock, HeapUnlock, HLock, remaining_element_count, push_mat_to_list, push_string, ER_catch, ER_success, ER_throwVar, compare_expressions, delete_expression, HToESI, next_expression_index, push_expression, push_quantum, top_estack, compare_numbers, primary_tag_list, push_simplify, DerefSym, QSysProtected, VarRecall, VarStore

See also: cmd_sortd