Routines for executing TI-Basic operators
Very few of the functions from this header file are documented as of now. Of
course, the ones which are undocumented have not been tested, either. It is
very likely that there are errors in this file, so use it with care.
However, we thought it might be a good idea to provide a header file for all
of the built-in TI-Basic operators which have a documented entry in the jump
table.
This way, you can easily search for particular operators if you need them. If
you use a function from this header file, please document it, too.
Many functions from this header file require their arguments to have some
specific format. They usually have to be internally simplified, which can be
achieved with the
push_internal_simplify
function from estack.h, and the result is an
internally simplified expression as well.
If you do not want to accept the AMS dependency of these functions, you can
usually construct an expression using their appropriate tags, and then call
push_internal_simplify.
Note: All functions from this header file get parameters from the expression stack, so this header file must be used in conjunction with estack.h. You need to learn about the usage of the expression stack before using any function from this header file. All functions defined here execute particular TI-Basic operators. They sometimes may be useful to perform some operations which cannot be implemented in C easily. But note that if you use functions from this header file too much, this will decrease the performance of your program significantly. In an extreme case, it will in fact decrease to that of a TI-Basic program! So use functions from this header file only if it is really necessary. Also note that these functions act exactly like the appropriate TI-Basic commands (including throwing errors if something is wrong), so the use of an error tracking mechanism from the error.h header file is highly recommended.
short did_push_to_polar (); |
Executes TI-Basic '>Polar' operator.
void push_and (CESI, CESI); |
Executes TI-Basic 'and' operator.
void push_arg_minus_1 (CESI); |
Executes TI-Basic '-' operator with constant 1.
void push_arg_plus_1 (CESI); |
Executes TI-Basic '+' operator with constant 1.
void push_assignment (CESI); |
Executes TI-Basic '->' operator or 'Define' command.
void push_degrees (CESI, CESI, CESI); |
Executes TI-Basic '°' operator.
void push_difference (CESI, CESI); |
Executes TI-Basic '-' operator.
void push_dot_add (CESI, CESI); |
Executes TI-Basic '.+' operator.
void push_dot_div (CESI, CESI); |
Executes TI-Basic './' operator.
void push_dot_exponentiate (CESI, CESI); |
Executes TI-Basic '.^' operator.
void push_dot_mult (CESI, CESI); |
Executes TI-Basic '.*' operator.
void push_dot_sub (CESI, CESI); |
Executes TI-Basic '.-' operator.
void push_equals (CESI, CESI); |
Executes TI-Basic '=' operator.
void push_exponentiate (CESI, CESI); |
Executes TI-Basic '^' operator.
void push_factorial (CESI); |
Executes TI-Basic '!' operator.
void push_greater_than_or_equals (CESI, CESI); |
Executes TI-Basic '>=' operator.
void push_greater_than (CESI, CESI); |
Executes TI-Basic '>' operator.
void push_indir_name (CESI); |
Executes TI-Basic '#' operator.
void push_less_than_or_equals (CESI, CESI); |
Executes TI-Basic '<=' operator.
void push_less_than (CESI, CESI); |
Executes TI-Basic '<' operator.
void push_list_plus (CESI ptr1, CESI ptr2); |
Executes TI-Basic '.+' operator.
Assuming that ptr1 and ptr2 point to tags of two lists (or matrices, which are "lists of lists"), push_list_plus pushes the element-by-element sum of these two lists to the expression stack. If the lists are not equal in size, an error will be thrown. If ptr1 or ptr2 doesn't point to a list tag, the behavior is unpredictable.
void push_list_times (CESI ptr1, CESI ptr2); |
Executes TI-Basic '.*' operator.
Assuming that ptr1 and ptr2 point to tags of two lists (or matrices, which are "lists of lists"), push_list_times pushes an element-by-element product of these two lists to the expression stack. If the lists are not equal in size, an error will be thrown. If ptr1 or ptr2 doesn't point to a list tag, the behavior is unpredictable.
void push_matrix_product (CESI ptr1, CESI ptr2); |
Executes TI-Basic '*' operator for matrices.
Assuming that ptr1 and ptr2 point to tags of two matrices (which are, in fact, lists of equally sized lists), push_matrix_product pushes the matrix product of these two matrices to the expression stack. As the matrix product is not comutative, the matrix pointed to by ptr1 is assumed to be the first factor. If the matrices are not compatible for multiplying, an error will be thrown. If ptr1 or ptr2 don't point to matrices, the behavior is unpredictable.
void push_negate (CESI); |
Executes TI-Basic '-' (negation) operator.
void push_not_equals (CESI, CESI); |
Executes TI-Basic '/=' operator.
void push_not (CESI); |
Executes TI-Basic 'not' operator.
void push_or (CESI, CESI); |
Executes TI-Basic 'or' operator.
void push_percent (CESI); |
Executes TI-Basic '%' operator.
void push_polar_to_rect_x(CESI rexpr, CESI thetaexpr); |
Executes TI-Basic 'P>Rx(' operator.
void push_polar_to_rect_y(CESI rexpr, CESI thetaexpr); |
Executes TI-Basic 'P>Ry(' operator.
void push_pow (CESI base_ptr, CESI exp_ptr); |
Executes TI-Basic '^' operator for floats.
Assuming that base_ptr and exp_ptr point to tags of two floating point numbers (called x and y for example), push_pow calculates x ^ y and pushes the result to the expression stack. If this assumption is not true, garbage will be pushed instead.
void push_product (CESI, CESI); |
Executes TI-Basic '*' operator.
void push_radians (CESI); |
Executes TI-Basic 'r' operator.
void push_ratio (CESI, CESI); |
Executes TI-Basic '/' operator.
void push_square (CESI); |
Executes TI-Basic '^' operator with exponent 2.
void push_subscripted_element (CESI); |
Executes TI-Basic '[]' operator.
void push_substitute_no_simplify (CESI, CESI, CESI); |
Executes TI-Basic '|' operator (unsimplified).
void push_substitute_simplify (CESI, CESI, CESI); |
Executes TI-Basic '|' operator (simplified).
void push_substitute_using_such_that (CESI expr, CESI var, CESI replacement); |
Executes TI-Basic '|' operator.
void push_sum (CESI, CESI); |
Executes TI-Basic '+' operator.
void push_to_cylin (); |
Executes TI-Basic '>Cylind' operator.
void push_to_dd(CESI expr); |
Executes TI-Basic '>DD' operator.
void push_to_dms(CESI expr); |
Executes TI-Basic '>DMS' operator.
void push_to_sphere (); |
Executes TI-Basic '>Sphere' operator.
void push_transpose(CESI mat); |
Executes TI-Basic 'T' operator.
This routine calls push_transpose_aux with parameter ConjFlag=1.
void push_xor (CESI, CESI); |
Executes TI-Basic 'xor' operator.