Routines for executing TI-Basic commands
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 commands. They sometimes may be useful to perform some operations which can not 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.
void cmd_andpic (SYM_STR SymName, CESI y, CESI x); |
Executes TI-Basic 'AndPic' command.
cmd_andpic displays the Graph Screen and logically ANDs the picture stored in
the TI-Basic variable pointed to by SymName (a VAT variable string,
see SYMSTR) into the current graph screen
at the pixel coordinates determined by the values pointed to by y and
x, respectively. Both x and y should point to integer items.
SymName should be the name of a PIC variable.
See BitmapPut for much faster
low-level manipulations with bitmap pictures, independently of the Graph
Screen.
See also: cmd_rclpic, cmd_xorpic, cmd_rplcpic, cmd_stopic, BitmapPut
void cmd_archive (CESI VarNameList); |
Executes TI-Basic 'Archive' command.
cmd_archive archives one or more TI-Basic variables (i.e. VAT symbols). For details about VarNameList, see cmd_lock.
See also: cmd_unarchiv, cmd_lock, cmd_unlock
void cmd_blddata (ESI SymName); |
Executes TI-Basic 'BldData' command.
cmd_blddata creates a TI-Basic data variable based on the information used to
plot the current graph. It is valid in all graphing modes. See the TI-Basic
BldData command in the TI-Basic manual for more details.
SymName should point to the variable tag of the wanted data variable
name, which may be a string of type
SYM_STR. However, it must be on the
expression stack, so you cannot pass a result of the
SYMSTR macro to cmd_blddata. Instead, if
you want to create the data variable named "foo", for example, you should do:
push_expression (SYMSTR ("foo")); cmd_blddata (top_estack);
Alternatively, SymName may point to END_TAG. In this case, the system variable "sysData" is used.
void cmd_circle (CESI x, CESI y, CESI radius, CESI drawmode); |
Executes TI-Basic 'Circle' command.
cmd_circle displays the Graph Screen and draws, erases, or inverts a circle on it.
The parameters x, y, radius, and drawmode should point
to four items on the expression stack, which represent
respectively the coordinates of the center of the circle, the radius, and the
drawing mode. All coordinates and the radius are integer or floating point values
which are relative to the current
window settings (you can change them using the
"Window Editor" application, or directly by storing values in system
variables like "xmin", using the VarStore function).
drawmode should point to one of the following values:
1 | Draws the circle. |
0 | Erases the circle. |
-1 | Inverts pixels along the circle. |
See also: cmd_pxlcircle, DrawClipEllipse
void cmd_clrdraw (void); |
Executes TI-Basic 'ClrDraw' command.
cmd_clrdraw clears the Graph Screen window and resets the Smart Graph feature, so that the next time the Graph Screen is displayed, the graph will be redrawn.
void cmd_clrerr (void); |
Executes TI-Basic 'ClrErr' command.
cmd_clrerr sets the TI-Basic system variable "errornum" to zero and clears the internal
error context variables.
Note: See TRY,
ONERR, and
ENDTRY to learn how to take control over
errors while executing a C program.
See also: cmd_try, cmd_passerr
void cmd_clrgraph (void); |
Executes TI-Basic 'ClrGraph' command.
cmd_clrgraph clears all functions or expressions that were graphed with the TI-Basic Graph command (or cmd_graph from this header file), or were created with the TI-Basic Table command (or cmd_table from this header file). All previously selected functions in the Y= Editor application will be graphed the next time that the graph is displayed.
See also: cmd_graph, cmd_table
void cmd_clrhome (void); |
Executes TI-Basic 'ClrHome' command.
cmd_clrhome clears all items stored in the Home Screen history area and clears the Home Screen window. It also resets the suffixes of arbitrary constants or integers (like @1, @n2, etc.) to 1.
See also: HS_freeAll, ARb_real_count, ARb_int_count
void cmd_clrio (void); |
Executes TI-Basic 'ClrIO' command.
cmd_clrio clears the TI-Basic Program I/O Screen window (without displaying it to the screen), and sets the Program I/O Screen window cursor position to the upper left corner.
void cmd_clrtable (void); |
Executes TI-Basic 'ClrTable' command.
cmd_clrtable clears all table values. This applies only to the ASK setting on the Table Setup dialog box. See the TI-Basic manual for more info.
void cmd_copyvar (SYM_STR SrcName, SYM_STR DestName); |
Executes TI-Basic 'CopyVar' command.
cmd_copyvar copies the contents of one TI-Basic variable to another one. The parameters SrcName and DestName should point to the variable tags of the source and the destination variable, respectively. If the destination variable does not exist, cmd_copyvar creates it. This function may be used instead of low-level routines from vat.h.
See also: cmd_movevar, cmd_rename
void cmd_cubicreg (ESI RegData); |
Executes TI-Basic 'CubicReg' command.
cmd_cubicreg calculates a cubic polynomial regression and updates all statistics variables (see TI-Basic manual for more info). The RegData parameter must point to a structure on the expression stack which describes where the actual data is stored. See cmd_linreg for more info.
See also: cmd_linreg, cmd_quadreg, cmd_quartreg, cmd_powerreg, cmd_expreg, cmd_lnreg, cmd_sinreg, cmd_onevar, cmd_twovar, cmd_medmed, cmd_logistic
void cmd_custmoff (void); |
Executes TI-Basic 'CustmOff' command.
cmd_custmoff removes the custom toolbar menu in the current application. The custom toolbar is removed automatically when you change the application.
void cmd_custmon (void); |
Executes TI-Basic 'CustmOn' command.
cmd_custmon activates a custom toolbar menu in the current application.
See also: cmd_toolbar, menus.h
void cmd_custom (void); |
Executes TI-Basic 'Custom' command.
cmd_custom is an internal subroutine used by the TI-Basic interpreter for defining
custom menus using 'Custom'...'EndCustm' blocks.
As this function depends heavily on some system state variables of the
TI-Basic intepreter which are not set correctly while executing an ASM
program, it is extremely unlikely that this function may be used inside a C
program for anything useful.
Note: Look at the functions from menus.h if you want to make menus inside a
C program.
See also: cmd_toolbar, menus.h
void cmd_cycle (void); |
Executes TI-Basic 'Cycle' command.
cmd_cycle is an internal subroutine used by the TI-Basic interpreter for
executing the Cycle command (performs searching for a matching For/EndFor
instruction, etc.).
As this function depends heavily on some system state variables of the
TI-Basic intepreter which are not set correctly while executing an ASM
program, it is extremely unlikely that this function may be used inside a C
program for anything useful.
Note: If you want to achieve a similar effect in the C language like
using the Cycle command in TI-Basic, you should use the
continue
keyword.
void cmd_cyclepic (CESI PicNamePrefix, CESI n, CESI wait, CESI cycles, CESI direction); |
Executes TI-Basic 'CyclePic' command.
cmd_cyclepic implements the TI-Basic CyclePic command, which displays the
Graph Screen and then displays a series of pictures (a slide show) on it in a
cycle. The PicNamePrefix parameter should point to a string item on
the expression stack (more precise, to its STR_TAG),
and n should point to an integer item which determines the total
number of pictures.
The names of the TI-Basic PIC variables which contain the
picture data will be derived from PicNamePrefix and n. For
example, if PicNamePrefix points to "pic" and n points to 5,
the picture data will be picked from TI-Basic PIC variables
called "pic1", "pic2", "pic3", "pic4" and "pic5".
The wait parameter should point to an integer or floating point item which
determines the time between pictures. cycles should point to an
integer item which determines the number of times to cycle through the
pictures. direction should point to an integer item containing 1 or -1.
If it is 1, the pictures will be displayed in a normal loop, and if it is -1,
the loop will run in both directions.
Note: The TI-Basic command CyclePic is implemented to allow making
simple animations in the TI-Basic. Although this function principally may be
used in C to accomplish the same task, the usage of it is tedious and there
are much better ways for doing this in C which are also independent of the
Graph Screen. Take a look at the functions from
graph.h,
wingraph.h, and
sprites.h.
void cmd_delfold (CESI FolderNameList); |
Executes TI-Basic 'DelFold' command.
cmd_delfold deletes one or more empty folders. It expects the following
layout on the expression stack:
END_TAG symname_n ... symname_2 symname_1
symname_1, symname_2, etc. are VAT symbol names
(see SYMSTR and
Tags for more info) of folders which
are supposed to be deleted. The FolderNameList parameter should point
to the tag of the last item. This function may be used as a high-level
alternative for the low-level function
FolderDel from the
vat.h header file.
See also: cmd_newfold, FolderDel
void cmd_delvar (CESI VarNameList); |
Executes TI-Basic 'DelVar' command.
This function deletes one or more TI-Basic variables. It expects the
following layout on the expression stack:
END_TAG symname_n ... symname_2 symname_1
symname_1, symname_2, etc. are VAT symbol names
(see SYMSTR and
Tags for more info) of variables which
are supposed to be deleted. The VarNameList parameter should point to
the tag of the last item. This function may be used as a high-level
alternative for the low-level function
SymDel from the
vat.h header file.
See also: SymDel
void cmd_dialog (void); |
Executes TI-Basic 'Dialog' command.
cmd_dialog is an internal subroutine used by the TI-Basic interpreter for defining
dialogs using 'Dialog'...'EndDlog' blocks.
As this function depends heavily on some system state variables of the
TI-Basic intepreter which are not set correctly while executing an ASM
program, it is extremely unlikely that this function may be used inside a C
program for anything useful.
Note: See functions from the dialogs.h
header file if you want to make dialogs inside a C program.
See also: cmd_text, cmd_request, dialogs.h
void cmd_disp (CESI ExprList); |
Executes TI-Basic 'Disp' command.
cmd_disp first displays the current contents of the TI-Basic Program I/O Screen window. If ExprList points to END_TAG, cmd_disp does nothing more. Else, the expression (or string, if ExprList points to STR_TAG) pointed to by ExprList is displayed on the TI-Basic Program I/O Screen window. This task is repeated for all expressions on the expression stack below ExprList, until END_TAG is reached. Each expression (or character string) is displayed on a separate line in the TI-Basic Program I/O Screen window. If "Pretty Print" in the current mode settings is turned on, expressions are displayed in mathematical notation.
void cmd_dispg (void); |
Executes TI-Basic 'DispG' command.
cmd_dispg displays the current contents of the Graph Screen window by switching to the "Graph" application (see the events.h header file for more information about switching applications).
void cmd_disphome (void); |
Executes TI-Basic 'DispHome' command.
cmd_disphome displays the current content of the Home Screen window.
More precise, it starts the Home application if it is not already running, and makes sure the
Home Screen window is being displayed switching from the Program I/O window if necessary.
The OS will deactivate or terminate the current application to activate the
Home Screen.
Note: If you used any function from this header file which displays various windows which
are different than Home Screen window (for example, TI-Basic Program I/O Screen window), use
cmd_disphome before returning from your program to activate the Home Screen again!
void cmd_disptbl (void); |
Executes TI-Basic 'DispTbl' command.
cmd_disptbl displays the current contents of the Table Screen window by switching to the "Table" application (see the events.h header file for more information about switching applications). It interrupts the execution of the program and accepts all keypress events of the "Table" application, until the 'ENTER' key is pressed.
void cmd_drawfunc (CESI expr); |
Executes TI-Basic 'DrawFunc' command.
cmd_drawfunc displays the Graph Screen and draws the expression pointed to by expr on the screen as a function, using "x" as the independent variable. For example, to draw the graph of the sine function, you can do:
push_parse_text ("sin(x)"); cmd_drawfunc (top_estack);
Note that the drawn graph is not part of the smart graph feature (see the TI-Basic manual for more info), and that regraphing will erase all drawn items.
See also: cmd_graph, cmd_drawinv, cmd_drawparm, cmd_drawpol
void cmd_drawinv (CESI expr); |
Executes TI-Basic 'DrawInv' command.
cmd_drawinv displays the Graph Screen and draws the inverse of the expression pointed to by expr on the screen by plotting x values on the y axis and y values on the x axis. "x" is used as the independent variable.
See also: cmd_drawfunc
void cmd_drawparm (CESI ExprList); |
Executes TI-Basic 'DrawParm' command.
cmd_drawparm displays the Graph Screen and draws a parametric graph, using
"t" as the independent variable. This function expects one of the following
eight layouts on the expression stack:
END_TAG tstep tmax tmin y_expr x_expr |
END_TAG tmax tmin y_expr x_expr |
END_TAG tstep NOTHING_TAG tmin y_expr x_expr |
END_TAG tstep tmax NOTHING_TAG y_expr x_expr |
END_TAG tmin y_expr x_expr |
END_TAG tmax NOTHING_TAG y_expr x_expr |
END_TAG tstep NOTHING_TAG NOTHING_TAG y_expr x_expr |
END_TAG y_expr x_expr |
x=cos(t)
and y=sin(t)
where t varies from 0 to 2*pi in steps of 0.1, you
can use the following code fragment:
push_Float (0.1); push_Float (2. * PI); push_Float (0); push_parse_text ("cos(t)"); push_parse_text ("sin(t)"); cmd_drawparm (top_estack);
If the current graphing mode is not parametric, only the first layout is valid. Otherwise, the omitted expressions will be picked from the current settings of the "tmin", "tmax", and "tstep" system variables, which can be set using the "Window Editor" application.
See also: cmd_drawpol, cmd_drawfunc
void cmd_drawpol (CESI ExprList); |
Executes TI-Basic 'DrawPol' command.
cmd_drawpol displays the Graph Screen and draws a polar graph, using
the Greek letter "theta" as the independent variable. This function expects
one of the following eight layouts on the expression stack:
END_TAG thstep thmax thmin expr |
END_TAG thmax thmin expr |
END_TAG thstep NOTHING_TAG thmin expr |
END_TAG thstep thmax NOTHING_TAG expr |
END_TAG thmin expr |
END_TAG thmax NOTHING_TAG expr |
END_TAG thstep NOTHING_TAG NOTHING_TAG expr |
END_TAG expr |
See also: cmd_drawparm, cmd_drawfunc
void cmd_else (void); |
Executes TI-Basic 'Else' command.
This is an internal subroutine used by TI-Basic interpreter for finding the
matching EndIf instruction when the Else instruction is encountered.
As this function depends heavily on some system state variables of the TI-Basic
intepreter which are not set correctly while executing an ASM program, it
is extremely unlikely that this function may be used inside a C program for
anything useful.
Note: See the if
and
else
keywords to learn how to
implement conditional execution in the C language.
See also: cmd_ifthen
void cmd_endfor (void); |
Executes TI-Basic 'EndFor' command.
cmd_endfor is an internal subroutine used by the TI-Basic interpreter for
terminating the 'For'...'EndFor' loop (searches for a matching 'For' instruction
and transfers the control there if necessary).
As this function depends heavily on some system state variables of the TI-Basic
intepreter which are not set correctly while executing an ASM program, it
is extremely unlikely that this function may be used inside a C program for
anything useful.
Note: See the for
keyword to learn how to use loops in C language which are similar to
For...EndFor loops in TI-Basic.
See also: cmd_for
void cmd_endloop (void); |
Executes TI-Basic 'EndLoop' command.
This is an internal subroutine used by the TI-Basic interpreter for
terminating the 'Loop'...'EndLoop' loop (searches for a matching 'Loop' instruction
and transfers the control there).
As this function depends heavily on some system state variables of the
TI-Basic intepreter which are not set correctly while executing an ASM
program, it is extremely unlikely that this function may be used inside a C
program for anything useful.
Note: See the
while
keyword to learn
how to use loops in the C language which are similar to Loop...EndLoop loops
in TI-Basic.
See also: cmd_while
void cmd_endtry (void); |
Executes TI-Basic 'EndTry' command.
cmd_endtry is an internal subroutine used by the TI-Basic interpreter for
terminating an error-protected block ('Try'...'EndTry'). Principally, this
function performs cmd_clrerr and signals
that further TI-Basic instructions are not error-protected anymore. It is
extremely unlikely that this function may be used inside a C program for
anything useful.
Note: See TRY,
ONERR, and
ENDTRY to learn how to take control over
errors while executing a C program.
See also: cmd_try
void cmd_endwhile (void); |
Executes TI-Basic 'EndWhile' command.
cmd_endwhile is an internal subroutine used by TI-Basic interpreter for
terminating the 'While'...'EndWhile' loop (searches for a matching 'While'
instruction and transfers the control there).
As this function depends heavily on some system state variables of the
TI-Basic intepreter which are not set correctly while executing an ASM
program, it is extremely unlikely that this function may be used inside a C
program for anything useful.
Note: See the
while
keyword to learn
how to use loops in the C language which are similar to While...EndWhile loops
in TI-Basic.
See also: cmd_while
void cmd_exit (void); |
Executes TI-Basic 'Exit' command.
cmd_exit is an internal subroutine used by the TI-Basic interpreter for executing the
Exit command (performs searching for a matching EndFor instruction, etc.).
As this function depends heavily on some system state variables of the TI-Basic
intepreter which are not set correctly while executing an ASM program, it
is extremely unlikely that this function may be used inside a C program for
anything useful.
Note: If you want to achieve the similar effect in the C language like using the Exit
command in TI-Basic, you should use the break
keyword.
void cmd_expreg (ESI RegData); |
Executes TI-Basic 'ExpReg' command.
cmd_expreg calculates an exponential regression and updates all statistics variables (see TI-Basic manual for more info). The RegData parameter must point to a structure on the expression stack which describes where the actual data is stored. See cmd_linreg for more info.
See also: cmd_linreg, cmd_quadreg, cmd_cubicreg, cmd_quartreg, cmd_powerreg, cmd_lnreg, cmd_sinreg, cmd_onevar, cmd_twovar, cmd_medmed, cmd_logistic
void cmd_fill (CESI expr, SYM_STR SymName); |
Executes TI-Basic 'Fill' command.
cmd_fill replaces each element in the TI-Basic matrix variable whose name is pointed to by SymName (see SYMSTR) with the expression pointed to by expr. The variable must already exist, else an error is thrown.
See also: VarStore
void cmd_fnoff (CESI IntList); |
Executes TI-Basic 'FnOff' command.
If IntList points to END_TAG, cmd_fnoff deselects all 'Y=' functions for the current graphing mode (note that in split-screen two-graph mode, cmd_fnoff only applies to the active graph). If IntList points to an integer item in the range from 1 to 99, cmd_fnoff deselects the specified 'Y=' function for the current graph mode, and repeats this task for all expressions on the expression stack below IntList, until END_TAG is reached.
See also: cmd_fnon
void cmd_fnon (CESI IntList); |
Executes TI-Basic 'FnOn' command.
If IntList points to END_TAG, cmd_fnon selects all 'Y=' functions that are defined for the current graphing mode (note that in split-screen two-graph mode, cmd_fnon only applies to the active graph). If IntList points to an integer item in the range from 1 to 99, cmd_fnon selects the specified 'Y=' function for the current graph mode, and repeats this task for all expressions on the expression stack below IntList, until END_TAG is reached. In 3D graphing mode, only one function at a time can be selected.
See also: cmd_fnoff
void cmd_for (SYM_STR VarName, CESI start, CESI end, CESI step); |
Executes TI-Basic 'For' command.
This is an internal subroutine used by TI-Basic interpreter for initializing
a counter variable used in a 'For'...'EndFor' loop.
As this function depends heavily on some system state variables of the TI-Basic
intepreter which are not set correctly while executing an ASM program, it
is extremely unlikely that this function may be used inside a C program for
anything useful.
Note: See the for
keyword to learn how to use loops in C language which are similar to
For...EndFor loops in TI-Basic.
See also: cmd_endfor
void cmd_get (SYM_STR SymName); |
Executes TI-Basic 'Get' command.
cmd_get receives a CBL (Calculator-Based Laboratory) value from the link port and stores it in a variable whose name is pointed to by SymName (a VAT variable name, see SYMSTR).
See also: cmd_send, cmd_getcalc
void cmd_getcalc (SYM_STR SymName); |
Executes TI-Basic 'GetCalc' command.
cmd_getcalc receives a variable (or program) whose name is pointed to by SymName (a VAT variable name, see SYMSTR) from the link interface. This function does nothing more than to call the function getcalc from the link.h header file.
See also: cmd_sendcalc, cmd_sendchat, cmd_get, getcalc
void cmd_goto (SYM_STR LabelName); |
Executes TI-Basic 'Goto' command.
cmd_goto is the main subroutine for executing the TI-Basic Goto statement. It searches the current TI-Basic program for the label whose name is pointed to by LabelName (see SYMSTR. cmd_goto throws an error if it is not found, otherwise it tells the TI-Basic interpreter where it is found (by storing its address in an internal variable). It is not likely that this function may be useful inside a C program for anything.
void cmd_graph (CESI ExprEtc); |
Executes TI-Basic 'Graph' command.
cmd_graph graphs the requested expressions or functions using the current graph mode.
This function uses the Smart Graph feature (see the TI-Basic manual). It expects the
following layout of the expression stack before calling (ExprEtc should
point to the last item):
Graph mode | Requested layout on the expression stack |
Function graphing | END_TAG var_name expression |
Parametric graphing | END_TAG var_name y_expression x_expression |
Polar graphing | END_TAG var_name expression |
3D graphing | END_TAG y_var_name x_var_name expression |
sin(t)+sin(2t)
with respect to t (assuming
that the current graph mode is set accordingly), you should do (example "Graph Function"):
// Graph a given function using the current graph settings #define USE_TI89 // Compile for TI-89 #define USE_TI92PLUS // Compile for TI-92 Plus #define USE_V200 // Compile for V200 #define MIN_AMS 101 // Compile for AMS 1.01 or higher #define SAVE_SCREEN // Save/Restore LCD Contents #include <tigcclib.h> // Include All Header Files // Main Function void _main(void) { TRY push_quantum (VAR_T_TAG); push_parse_text ("sin(t)+sin(2t)"); cmd_graph (top_estack); ngetchx (); cmd_disphome (); ONERR ENDTRY }
Or, you can avoid push_parse_text by transforming the expression into RPN manually (which is very easy):
static ESQ rpn[] = {END_TAG, VAR_T_TAG, VAR_T_TAG, SIN_TAG, VAR_T_TAG, 2, 1, POSINT_TAG, MUL_TAG, SIN_TAG, ADD_TAG}; cmd_graph (rpn + sizeof(rpn) - 1);
All expressions entered using cmd_graph or cmd_table are remembered and assigned increasing function numbers starting with 1. The currently selected 'Y=' functions are deselected. Use cmd_clrgraph to clear the functions graphed with this command (they will also be cleared after you go to the Y= Editor application to re-enable the system 'Y=' functions).
See also: cmd_table, cmd_drawfunc, cmd_clrgraph
void cmd_if (CESI condition); |
Executes TI-Basic 'If' command.
This is an internal subroutine used by TI-Basic interpreter for executing
simple If instructions (skips the next expression or tokenized TI-Basic
statement if the condition is not true).
As this function depends heavily on some system state variables of the
TI-Basic intepreter which are not set correctly while executing an ASM
program, it is extremely unlikely that this function may be used inside a C
program for anything useful.
Note: See the if
and
else
keywords to learn how to
implement conditional execution in the C language.
See also: cmd_ifthen
void cmd_ifthen (CESI condition); |
Executes TI-Basic 'If'...'Then' command.
cmd_ifthen is an internal subroutine used by TI-Basic interpreter for
executing 'If'...'EndIf' and 'If'...'Else'...'EndIf' blocks (searches for a matching
'Else', 'ElseIf' or 'EndIf' instruction and transfers the control there if the
condition is not true).
As this function depends heavily on some system state variables of the
TI-Basic intepreter which are not set correctly while executing an ASM
program, it is extremely unlikely that this function may be used inside a C
program for anything useful.
Note: See the if
and
else
keywords to learn how to
implement conditional execution in the C language.
void cmd_input (CESI PromptAndVar); |
Executes TI-Basic 'Input' command.
If PromptAndVar points to END_TAG, cmd_input pauses
the program, performs cmd_dispg, and lets the user update the system
coordinates "xc" and "yc" (as well as "rc" and "theta_c" for polar coordinate mode) by positioning the
graph cursor.
If PromptAndVar points to a string item or to a variable tag, cmd_input works exactly
like cmd_inputstr, but it treats the user response as an expression
instead of a string (cmd_inputstr always stores the response as
a string).
void cmd_inputstr (ESI PromptAndVar); |
Executes TI-Basic 'InputStr' command.
If PromptAndVar points to a string item (more precise, to its STR_TAG), cmd_inputstr first displays the current contents of the TI-Basic Program I/O Screen window, pauses the program, displays the prompt string pointed to by PromptAndVar on the Program I/O Screen, waits for the user to enter a response, and stores the response in a TI-Basic variable whose name is given on the expression stack just below the expression pointed to by PromptAndVar. This is illustated in the following example, which stores the user's name in a TI-Basic variable named "x":
push_quantum (VAR_X_TAG); push_zstr ("Enter your name:"); cmd_inputstr (top_estack);
If PromptAndVar points directly to a variable tag, "?" is displayed as a
prompt.
Note: cmd_inputstr is not the recommended way for inputing data from the keyboard into the
program. It is limited to the TI-Basic Program I/O Screen window, and it stores the result in TI-Basic
variables, which is not so useful in C programs (i.e. you need to import the value
of a TI-Basic variable into the program, which is not so straightforward). See the
keyboard input section of the FAQ list for explanation of much
better ways to enter data from the keyboard.
void cmd_line (CESI x1, CESI y1, CESI x2, CESI y2, CESI drawmode); |
Executes TI-Basic 'Line' command.
cmd_line displays the Graph Screen and draws, erases, or inverts a line
segment on it.
The parameters x1, y1, x2, y2, and
drawmode should point to five items on the expression stack,
which represent respectively the coordinates of the starting point, the
ending point, and the drawing mode. All coordinates are integer or floating point
values which are relative to the
current window settings (you can change them using the "Window Editor"
application, or directly by storing values in system variables "xmin" etc.,
using the VarStore function). The
parameter drawmode should point to one of the following values:
1 | Draws the line. |
0 | Erases the line. |
-1 | Inverts pixels along the line. |
See also: cmd_pxlline, DrawLine, DrawClipLine, cmd_circle, cmd_linehorz, cmd_linevert, cmd_pton, cmd_ptoff, cmd_ptchg
void cmd_linehorz (CESI y, CESI drawmode); |
Executes TI-Basic 'LineHorz' command.
cmd_linehorz displays the Graph Screen and draws, erases, or inverts a
horizontal line on it. The parameters y and drawmode should
point to two items on the expression stack, which represent
respectively the y coordinate of the line and the drawing mode. The
y coordinate is an integer or floating point value which is
relative to the current window settings (you can
change them using the "Window Editor" application, or directly
by storing values in system variables "xmin" etc., using the
VarStore function).
The parameter drawmode should point to one of the following values:
1 | Draws the line. |
0 | Erases the line. |
-1 | Inverts pixels along the line. |
See also: cmd_pxlhorz, DrawLine, DrawClipLine, cmd_linevert, cmd_line
void cmd_linetan (CESI expr, CESI x); |
Executes TI-Basic 'LineTan' command.
cmd_linetan displays the Graph Screen and draws a tangent line to the expression pointed to by expr (the expression is assumed to be a function which uses x as the independent variable) at the point specified by the floating point item pointed to by x.
See also: cmd_slpline, cmd_line, cmd_drawfunc
void cmd_linevert (CESI x, CESI drawmode); |
Executes TI-Basic 'LineVert' command.
cmd_linehorz displays the Graph Screen and draws, erases, or inverts a
vertical line on it. The parameters x and drawmode should
point to two items on the expression stack, which represent
respectively the x coordinate of the line and the drawing mode. The
x coordinate is an integer or floating point value which is relative to the current
window settings (you can
change them using the "Window Editor" application, or directly
by storing values in system variables "xmin" etc., using the
VarStore function).
The parameter drawmode should point to one of the following values:
1 | Draws the line. |
0 | Erases the line. |
-1 | Inverts pixels along the line. |
See also: cmd_pxlvert, DrawLine, DrawClipLine, cmd_linehorz, cmd_line
void cmd_linreg (ESI RegData); |
Executes TI-Basic 'LinReg' command.
cmd_linreg calculates a linear regression and updates all statistics
variables (see TI-Basic manual for more info). The RegData parameter
must point to a structure on the expression stack which describes where the
actual data is stored. This structure may have one of the following four
layouts (RegData should point to the last item):
NOTHING_TAG NOTHING_TAG NOTHING_TAG y_list_name x_list_name |
NOTHING_TAG NOTHING_TAG freqs_name y_list_name x_list_name |
END_TAG categories_list LIST_TAG categories_name NOTHING_TAG y_list_name x_list_name |
END_TAG categories_list LIST_TAG categories_name freqs_name y_list_name x_list_name |
push_quantum (NOTHING_TAG); push_quantum (NOTHING_TAG); push_quantum (NOTHING_TAG); push_expression (SYMSTR ("ydata")); push_expression (SYMSTR ("xdata")); cmd_linreg (top_estack);
After this, you can retrieve the calculated regression data by accessing
TI-Basic system variables like "regCoef" directly (using
VarRecall, for example), or you can
display the calculated data using
cmd_showstat.
The symbol names x_list_name, y_list_name, freqs_name,
and categories_name may also be "c1".."c99". In this case, they
represent columns in the last data variable shown in the Data/Matrix editor.
In all cases, the lists represented by x_list_name,
y_list_name, freqs_name, and categories_name must have
the same dimension.
See also: cmd_quadreg, cmd_cubicreg, cmd_quartreg, cmd_powerreg, cmd_expreg, cmd_lnreg, cmd_sinreg, cmd_onevar, cmd_twovar, cmd_medmed, cmd_logistic
void cmd_lnreg (ESI RegData); |
Executes TI-Basic 'LnReg' command.
cmd_lnreg calculates a logarithmic regression and updates all statistics variables (see TI-Basic manual for more info). RegData must point to a structure on the expression stack which describes where the actual data is stored. See cmd_linreg for more info.
See also: cmd_linreg, cmd_quadreg, cmd_cubicreg, cmd_quartreg, cmd_powerreg, cmd_expreg, cmd_sinreg, cmd_onevar, cmd_twovar, cmd_medmed, cmd_logistic
void cmd_local (CESI VarNameList); |
Executes TI-Basic 'Local' command.
cmd_local creates a temporary folder (see
TempFolderName for more info about
temporary folders), then creates one or more VAT entries in it. This function
expects the following layout on the expression stack:
END_TAG symname_n ... symname_2 symname_1
symname_1, symname_2, etc. are VAT symbol names (see
SYMSTR and
Tags for more info) of variables which
will be created in the temporary folder. The parameter VarNameList
should point to the tag of the last item. This function is used by the
TI-Basic interpreter for declaring TI-Basic variables as local ones (they are
kept in temporary folders).
void cmd_lock (CESI VarNameList); |
Executes TI-Basic 'Lock' command.
cmd_lock locks one or more TI-Basic variables (i.e. VAT symbols). It expects
the following layout on the expression stack:
END_TAG symname_n ... symname_2 symname_1
symname_1, symname_2, etc. are VAT symbol names (see
SYMSTR and
Tags for more info) of variables which
should be locked. The parameter VarNameList should point to the tag of
the last item.
See also: cmd_unlock, cmd_archive, cmd_unarchiv
void cmd_logistic (ESI RegData); |
Executes TI-Basic 'Logistic' command.
cmd_logistic calculates a logistic regression and updates all statistics
variables (see TI-Basic manual for more info). The RegData parameter
must point to a structure on the expression stack which describes where the
actual data is stored. This structure may have one of the following eight
layouts (RegData should point to the last item):
NOTHING_TAG NOTHING_TAG NOTHING_TAG NOTHING_TAG y_list_name x_list_name |
NOTHING_TAG NOTHING_TAG NOTHING_TAG iterations y_list_name x_list_name |
NOTHING_TAG NOTHING_TAG freqs_name NOTHING_TAG y_list_name x_list_name |
NOTHING_TAG NOTHING_TAG freqs_name iterations y_list_name x_list_name |
END_TAG categories_list LIST_TAG categories_name NOTHING_TAG NOTHING_TAG y_list_name x_list_name |
END_TAG categories_list LIST_TAG categories_name NOTHING_TAG iterations y_list_name x_list_name |
END_TAG categories_list LIST_TAG categories_name freqs_name NOTHING_TAG y_list_name x_list_name |
END_TAG categories_list LIST_TAG categories_name freqs_name iterations y_list_name x_list_name |
See also: cmd_linreg, cmd_quadreg, cmd_cubicreg, cmd_quartreg, cmd_powerreg, cmd_expreg, cmd_lnreg, cmd_sinreg, cmd_onevar, cmd_twovar, cmd_medmed
void cmd_medmed (ESI RegData); |
Executes TI-Basic 'MedMed' command.
cmd_medmed calculates the median-median line and updates all statistics variables (see TI-Basic manual for more info). The RegData parameter must point to a structure on the expression stack which describes where the actual data is stored. See cmd_linreg for more info.
See also: cmd_linreg, cmd_quadreg, cmd_cubicreg, cmd_quartreg, cmd_powerreg, cmd_expreg, cmd_lnreg, cmd_sinreg, cmd_onevar, cmd_twovar, cmd_logistic
void cmd_movevar (SYM_STR SymName, SYM_STR SrcFolder, SYM_STR DestFolder); |
Executes TI-Basic 'MoveVar' command.
cmd_movevar moves a TI-Basic variable from one folder to another. The
parameter SymName should point to the variable tag of the symbol which
will be moved (see SYMSTR).
SrcFolder and DestFolder should point to the variable tags of
the source and the destination folders, respectively. If the destination
folder does not exist, cmd_movevar creates it. This function may be used
instead of the low-level function SymMove
from the vat.h header file.
This function may cause heap compression.
See also: cmd_copyvar, cmd_rename, SymMove
void cmd_newdata (CESI Data); |
Executes TI-Basic 'NewData' command.
cmd_newdata creates a TI-Basic data variable. This function expects the
following layout on the expression stack:
END_TAG listexpr_n ... listexpr_2 listexpr_1 symname
listexpr_1, listexpr_2, etc. are list expressions (they may be
symbol names of TI-Basic list variables as well), and symname is
the VAT symbol name (see SYMSTR and
Tags for more info) of the TI-Basic data
variable which will be created. The parameter Data should point to the
tag of the last item on the expression stack. The data variable will be built
up from these list expressions; each list will become one column of the data
variable. There must be at least one list. This function also makes the new
variable the current one in the Data/Matrix editor. See the TI-Basic manual
for more info.
void cmd_newfold (SYM_STR FolderName); |
Executes TI-Basic 'NewFold' command.
cmd_newfold creates a new folder, then sets the current folder to that folder. The parameter FolderName should point to the variable tag of the name of the folder to be created (see SYMSTR). This function may be used as a high-level alternative for the low-level functions FolderAdd and FolderCur from the vat.h header file.
See also: cmd_delfold, FolderAdd, FolderCur
void cmd_newpic (ESI Matrix, SYM_STR PicName, ESI MaxRow, ESI MaxCol); |
Executes TI-Basic 'NewPic' command.
cmd_newpic creates a new TI-Basic PIC variable based on data from a matrix on
the expression stack (see TI-Basic manual for more info). The parameter
Matrix should point to the tag of an n x 2 matrix on the
expression stack (its elements must be integer items). Each row in the matrix
represents a pixel. Pixel coordinates starts at (0,0). PicName should
point to the variable tag of the symbol (i.e. TI-Basic variable) which will
be created (see SYMSTR). If the symbol
already exists, cmd_newpic replaces it. The parameters MaxRow and
MaxCol should point to two integer items which determine the height
and the width of the created PIC variable, i.e. the maximum boundary limits
for it. Optionally, either MaxRow or MaxCol may point to
END_TAG. In this case, default values
will be used, which are determined from the minimum area required for the
matrix values.
This function may cause heap compression.
void cmd_newplot (ESI PlotData); |
Executes TI-Basic 'NewPlot' command.
cmd_newplot creates a new statistical plot definition (see TI-Basic manual
for more info).The PlotData parameter must point to a structure on the
expression stack which describes where the actual data is stored (more
precisely, it must point to the last item of it). It is possible to create
five types of statistical plots: scatter plot, X-Y line plot, box plot,
histogram and modified box plot. There is an item called type_id on
the expression stack, which determines the type of the plot. It must be an
integer item, with one of the following values:
1 | Scatter plot |
2 | X-Y line plot |
3 | Box plot |
4 | Histogram |
5 | Modified box plot |
END_TAG y_list_name x_list_name type_id plot_no |
END_TAG mark_id NOTHING_TAG NOTHING_TAG NOTHING_TAG y_list_name x_list_name type_id plot_no |
END_TAG END_TAG categories_list LIST_TAG categories_name NOTHING_TAG y_list_name x_list_name type_id plot_no |
END_TAG mark_id END_TAG categories_list LIST_TAG categories_name NOTHING_TAG y_list_name x_list_name type_id plot_no |
1 | box (a small empty square) |
2 | cross (x) |
3 | plus (+) |
4 | square (a small filled square) |
5 | dot |
END_TAG data_list_name type_id plot_no |
END_TAG freqs_name NOTHING_TAG data_list_name type_id plot_no |
END_TAG END_TAG categories_list LIST_TAG categories_name NOTHING_TAG NOTHING_TAG data_list_name type_id plot_no |
END_TAG END_TAG categories_list LIST_TAG categories_name freqs_name NOTHING_TAG data_list_name type_id plot_no |
END_TAG data_list_name type_id plot_no |
END_TAG mark_id NOTHING_TAG NOTHING_TAG NOTHING_TAG NOTHING_TAG data_list_name type_id plot_no |
END_TAG freqs_name NOTHING_TAG data_list_name type_id plot_no |
END_TAG mark_id NOTHING_TAG NOTHING_TAG freqs_name NOTHING_TAG data_list_name type_id plot_no |
END_TAG END_TAG categories_list LIST_TAG categories_name NOTHING_TAG NOTHING_TAG data_list_name type_id plot_no |
END_TAG mark_id END_TAG categories_list LIST_TAG categories_name NOTHING_TAG NOTHING_TAG data_list_name type_id plot_no |
END_TAG END_TAG categories_list LIST_TAG categories_name freqs_name NOTHING_TAG data_list_name type_id plot_no |
END_TAG mark_id END_TAG categories_list LIST_TAG categories_name freqs_name NOTHING_TAG data_list_name type_id plot_no |
END_TAG data_list_name type_id plot_no |
END_TAG freqs_name NOTHING_TAG data_list_name type_id plot_no |
END_TAG bck_width NOTHING_TAG NOTHING_TAG NOTHING_TAG NOTHING_TAG NOTHING_TAG data_list_name type_id plot_no |
END_TAG bck_width NOTHING_TAG NOTHING_TAG NOTHING_TAG freqs_name NOTHING_TAG data_list_name type_id plot_no |
END_TAG END_TAG categories_list LIST_TAG categories_name NOTHING_TAG NOTHING_TAG data_list_name type_id plot_no |
END_TAG END_TAG categories_list LIST_TAG categories_name freqs_name NOTHING_TAG data_list_name type_id plot_no |
END_TAG bck_width NOTHING_TAG END_TAG categories_list LIST_TAG categories_name NOTHING_TAG NOTHING_TAG data_list_name type_id plot_no |
END_TAG bck_width NOTHING_TAG END_TAG categories_list LIST_TAG categories_name freqs_name NOTHING_TAG data_list_name type_id plot_no |
push_longint (4); push_quantum (NOTHING_TAG); push_quantum (NOTHING_TAG); push_quantum (NOTHING_TAG); push_expression (SYMSTR ("ydata")); push_expression (SYMSTR ("xdata")); push_shortint (1); push_shortint (1); cmd_newplot (top_estack); cmd_dispg ();
Note that cmd_newplot only creates a plot. To actually display it, you must
activate the Graph screen (using cmd_dispg,
for example).
The symbol names x_list_name, y_list_name,
data_list_name, freqs_name, and categories_name may also
be "c1".."c99". In this case, they represent columns in the last data
variable shown in the Data/Matrix editor. In all cases, the lists represented
by x_list_name, y_list_name, data_list_name,
freqs_name, and categories_name must have the same dimension.
See also: cmd_plotson, cmd_plotsoff
void cmd_newprob (void); |
Executes TI-Basic 'NewProb' command.
cmd_newprob performs a variety of operations that let you begin a new problem from a cleared state without resetting the memory. It clears all single-character (a-z) TI-Basic variables in the current folder (unless the variables are locked or archived), turns off all functions and stat plots in the current graph mode, clears the error flag, and performs cmd_clrdraw, cmd_clrgraph, cmd_clrhome, cmd_clrio and cmd_clrtable.
void cmd_onevar (ESI StatData); |
Executes TI-Basic 'OneVar' command.
cmd_onevar calculates one-variable statistics and updates all statistics
variables (see TI-Basic manual for more info). The StatData parameter
must point to a structure on the expression stack which describes where the
actual data is stored. This structure may have one of the following four
layouts (StatData should point to the last item):
NOTHING_TAG NOTHING_TAG NOTHING_TAG list_name |
NOTHING_TAG NOTHING_TAG freqs_name list_name |
END_TAG categories_list LIST_TAG categories_name NOTHING_TAG list_name |
END_TAG categories_list LIST_TAG categories_name freqs_name list_name |
push_quantum (NOTHING_TAG); push_quantum (NOTHING_TAG); push_quantum (NOTHING_TAG); push_expression (SYMSTR ("datavals")); cmd_onevar (top_estack);
After this, you can retrieve the calculated regression data by accessing
TI-Basic system variables like "minX" directly (using
VarRecall, for example), or you can
display the calculated data using
cmd_showstat.
The symbol names list_name, freqs_name, and
categories_name may also be "c1".."c99". In this case, they represent
columns in the last data variable shown in the Data/Matrix editor.
In all cases, the lists represented by list_name, freqs_name,
and categories_name must have the same dimension.
See also: cmd_twovar, cmd_linreg, cmd_quadreg, cmd_cubicreg, cmd_quartreg, cmd_powerreg, cmd_expreg, cmd_lnreg, cmd_sinreg, cmd_medmed, cmd_logistic
void cmd_output (CESI Row, CESI Column, CESI Expr); |
Executes TI-Basic 'Output' command.
cmd_output first displays the current contents of the TI-Basic Program I/O Screen window. Then, the expression (or string, if Expr points to a STR_TAG) pointed to by Expr is displayed on the TI-Basic Program I/O Screen window at the TI-Basic text coordinates determined by expressions (usually numbers) pointed to by Row and Column. If "Pretty Print" in current calculator mode settings is turned on, expressions are displayed in mathematical notation.
void cmd_passerr (void); |
Executes TI-Basic 'PassErr' command.
cmd_passerr does nothing if the TI-Basic system variable 'errornum' is equal
to zero, else it throws an error (using the
ER_throwVar function) whose number
is equal to the value of the system variable "errornum".
Note: See TRY,
ONERR, and
ENDTRY to learn how to take control over
errors while executing a C program.
See also: cmd_try, cmd_clrerr, cmd_exit, cmd_return
void cmd_pause (CESI Expr); |
Executes TI-Basic 'Pause' command.
cmd_pause suspends the program execution until 'ENTER' is pressed. If Expr points to END_TAG, cmd_output does nothing more. But, if Expr points to an expression, it displays the current contents of the TI-Basic Program I/O Screen window and displays the expression pointed to by Expr at the current TI-Basic text coordinates. If "Pretty Print" in current calculator mode settings is turned on, expressions are displayed in mathematical notation. If the result of the expression is too big to fit on the screen, you can use the cursor pad to scroll the display.
void cmd_plotsoff (CESI IntList); |
Executes TI-Basic 'PlotsOff' command.
If IntList points to END_TAG, cmd_plotson turns off all statistical plots for graphing (note that in split-screen two-graph mode, cmd_plotson only applies to the active graph). If IntList points to an integer item in the range from 1 to 99, cmd_plotson turns off the specified statistical plot, and repeats this task for all expressions on the expression stack below IntList, until END_TAG is reached.
See also: cmd_plotson, cmd_newplot
void cmd_plotson (CESI IntList); |
Executes TI-Basic 'PlotsOn' command.
If IntList points to END_TAG, cmd_plotson turns on all statistical plots for graphing (note that in split-screen two-graph mode, cmd_plotson only applies to the active graph). If IntList points to an integer item in the range from 1 to 99, cmd_plotson turns on the specified statistical plot, and repeats this task for all expressions on the expression stack below IntList, until END_TAG is reached.
See also: cmd_plotsoff, cmd_newplot
void cmd_popup (ESI ItemList, ESI SymName); |
Executes TI-Basic 'Popup' command.
cmd_popup displays a popup menu containing character strings from the list
of strings pointed to by ItemList (it should point to the tag of the
list, i.e. to the LIST_TAG),
waits for the user to select an item, and stores the index of the selection
in the TI-Basic variable determined by the SymName parameter (see
SYMSTR). If the variable does not exist,
it will be created. Each item in the list expression must be a string. Also,
both the ItemList and SymName entries must be on the expression
stack, and the SymName entry must be exactly below the ItemList
entry on the expression stack (the ItemList entry is usually on the
top of the expression stack). As this function serves mainly as an internal
subroutine for executing the TI-Basic Popup command, such a limitation is not
so unusual.
Note: See PopupNew,
PopupDo, and other functions from
menus.h, for much more flexible methods to
create popup menus in a C program.
See also: cmd_toolbar, menus.h
void cmd_powerreg (ESI RegData); |
Executes TI-Basic 'PowerReg' command.
cmd_powerreg calculates a power regression and updates all statistics variables (see TI-Basic manual for more info). The RegData parameter must point to a structure on the expression stack which describes where the actual data is stored. See cmd_linreg for more info.
See also: cmd_linreg, cmd_quadreg, cmd_cubicreg, cmd_quartreg, cmd_expreg, cmd_lnreg, cmd_sinreg, cmd_onevar, cmd_twovar, cmd_medmed, cmd_logistic
void cmd_printobj (SYM_STR SymName); |
Executes TI-Basic 'PrintObj' command.
cmd_printobj sends the variable whose name is pointed to by SymName (a VAT string, see SYMSTR) as a "Print Object" through the link interface. See the TI-Basic manual (chapter "Creating a Lab Report") for more info about Print Objects.
void cmd_prompt (CESI VarList); |
Executes TI-Basic 'Prompt' command.
cmd_prompt assumes that VarList points to a variable tag. It displays the current contents of the TI-Basic Program I/O Screen window, then displays a prompt on the Program I/O Screen for the variable pointed to by VarList, using its own name as the prompt (with a question mark appended after the name). Then, it waits for a user response, and stores the entered expression in the corresponding variable. This task is repeated for all entries on the expression stack below VarList, until END_TAG is reached.
void cmd_ptchg (CESI xValOrList, CESI yValOrList); |
Executes TI-Basic 'PtChg' command.
cmd_ptchg acts like cmd_pton, but inverts the state of the pixel instead of turning it on unconditionally.
See also: cmd_pton, cmd_ptoff, cmd_pxlchg
void cmd_ptoff (CESI xValOrList, CESI yValOrList); |
Executes TI-Basic 'PtOff' command.
cmd_ptoff acts like cmd_pton, but turns off the pixel instead of turning it on.
See also: cmd_pton, cmd_ptchg, cmd_pxloff
void cmd_pton (CESI xValOrList, CESI yValOrList); |
Executes TI-Basic 'PtOn' command.
cmd_pton displays the Graph Screen and turns on the screen pixel nearest to
the window coordinates (x,y) which are relative to the current window
settings (you can change them using the "Window Editor" application, or
directly by storing values in system variables like "xmin", using the
VarStore function).
The parameters xValOrList and yValOrList should either point
to integer or floating point items on the expression stack, or to lists of
integer or floating
point items which contain x and y coordinates respectively (both lists must
have an equal number of elements). In the second case, a set of corresponding
pixels will be turned on, instead of just one pixel.
See also cmd_pxlon, which uses pixel
coordinates instead of window relative ones, and
DrawPix for much faster low-level pixel
drawing (independently of the Graph Screen).
See also: cmd_ptoff, cmd_ptchg, cmd_pxlon, cmd_line, cmd_circle, DrawPix
void cmd_pttext (CESI string, CESI x, CESI y); |
Executes TI-Basic 'PtText' command.
cmd_pttext displays the Graph Screen and places a character string on the
screen at the pixel nearest to the window coordinates (x,y), which are
relative to the current window settings (you can change them using the
"Window Editor" application, or directly by storing values in system
variables like "xmin", using the
VarStore function).
The parameters x and y should point to integer or floating point
items which determine the coordinates, and the parameter string
should point to the tag of a string expression to be displayed.
See also cmd_pxltext, which uses pixel
coordinates instead of window-relative ones, and
DrawStr for much faster low-level
string drawing (independently of the Graph Screen).
See also: cmd_pxltext, DrawStr
void cmd_pxlchg (CESI yValOrList, CESI xValOrList); |
Executes TI-Basic 'PxlChg' command.
cmd_pxlchg acts like cmd_pxlon, but inverts the state of the pixel instead of turning it on unconditionally.
See also: cmd_pxlon, cmd_pxloff, cmd_ptchg
void cmd_pxlcircle (CESI y, CESI x, CESI radius, CESI drawmode); |
Executes TI-Basic 'PxlCircle' command.
cmd_pxlcircle displays the Graph Screen and draws, erases, or inverts a circle
on it. The parameters y, x, radius and drawmode
should point to four integer items on the expression stack, which represent
respectively the coordinates of the center of the circle (note that the order
of x and y is swapped), the radius, and the drawing mode. The
coordinates are absolute pixel coordinates (independent of the current window
settings), where (0,0) is the top left corner of the Graph Screen, excluding
the menu area. The radius is also measured in pixels. The parameter
drawmode should point to one of the following values:
1 | Draws the circle. |
0 | Erases the circle. |
-1 | Inverts pixels along the circle. |
See also: cmd_circle, DrawClipEllipse
void cmd_pxlhorz (CESI y, CESI drawmode); |
Executes TI-Basic 'PxlHorz' command.
cmd_pxlhorz displays the Graph Screen and draws, erases, or inverts a
horizontal line on it.
The parameters y and drawmode should point to two integer items
on the expression stack, which represent respectively the y coordinate of the
line and the drawing mode. The y coordinate is an absolute pixel coordinate
(independent of the current window settings), where 0 is the top border of
the Graph Screen, excluding the menu area. The parameter drawmode
should point to one of the following values:
1 | Draws the line. |
0 | Erases the line. |
-1 | Inverts pixels along the line. |
See also: cmd_linehorz, DrawLine, DrawClipLine, cmd_pxlvert, cmd_pxlline
void cmd_pxlline (CESI y1, CESI x1, CESI y2, CESI x2, CESI drawmode); |
Executes TI-Basic 'PxlLine' command.
cmd_pxlline displays the Graph Screen and draws, erases, or inverts a line
segment on it.
The parameters y1, x1, y2, x2, and
drawmode should point to five integer items on the expression stack,
which represent respectively the coordinates of the starting point (note that
the order of x and y coordinates is swapped), the ending point, and the
drawing mode. The coordinates are absolute pixel coordinates (independent of
the current window settings), where (0,0) is the top left corner of the Graph
Screen, excluding the menu area. The parameter drawmode should
point to one of the following values:
1 | Draws the line. |
0 | Erases the line. |
-1 | Inverts pixels along the line. |
See also: cmd_line, DrawLine, DrawClipLine, cmd_pxlcircle, cmd_pxlhorz, cmd_pxlvert, cmd_pxlon, cmd_pxloff, cmd_pxlchg
void cmd_pxloff (CESI yValOrList, CESI xValOrList); |
Executes TI-Basic 'PxlOff' command.
cmd_pxloff acts like cmd_pxlon, but turns off the pixel instead of turning it on.
See also: cmd_pxlon, cmd_pxlchg, cmd_ptoff
void cmd_pxlon (CESI yValOrList, CESI xValOrList); |
Executes TI-Basic 'PxlOn' command.
cmd_pxlon displays the Graph Screen and turns on the screen pixel at the
screen coordinates (x,y). The coordinates are absolute pixel coordinates
(independent of the current window settings), where (0,0) is the top left
corner of the Graph Screen, excluding the menu area.
The parameters yValOrList and xValOrList should either point
to two integer items on the expression stack, or to list of integer items
which contain y and x coordinates respectively (both lists must
have an equal number of elements). In the second case, a set of corresponding
pixels will be turned on instead of just one pixel.
See also cmd_pton, which uses window-relative
coordinates, and DrawPix for much
faster low-level pixel drawing (independently of the Graph Screen).
See also: cmd_pxloff, cmd_pxlchg, cmd_pton, cmd_pxlline, cmd_pxlcircle, DrawPix
void cmd_pxltext (CESI string, CESI y, CESI x); |
Executes TI-Basic 'PxlText' command.
cmd_pxltext displays the Graph Screen and places a character string on the
screen at the pixel (x,y). The coordinates are absolute pixel coordinates
(independent of the current window settings), where (0,0) is the top left
corner of the Graph Screen, excluding the menu area.
The parameters y and x should point to integer items
on the expression stack which determine the coordinates (note that the order of x and y
coordinates is swapped), and the parameter string should point to the
tag of a string expression to be displayed.
See also cmd_pttext, which uses
window-relative coordinates, and
DrawStr for
much faster low-level string drawing (independently of the Graph Screen).
See also: cmd_pttext, DrawStr
void cmd_pxlvert (CESI x, CESI drawmode); |
Executes TI-Basic 'PxlVert' command.
cmd_pxlvert displays the Graph Screen and draws, erases, or inverts a
vertical line on it.
The parameters x and drawmode should point to two integer items
on the expression stack, which represent respectively the x coordinate of the
line and the drawing mode. The x coordinate is an absolute pixel coordinate
(independent of the current window settings), where 0 is the left border of
the Graph Screen. The parameter drawmode should point to one of the
following values:
1 | Draws the line. |
0 | Erases the line. |
-1 | Inverts pixels along the line. |
See also: cmd_linevert, DrawLine, DrawClipLine, cmd_pxlhorz, cmd_pxlline
void cmd_quadreg (ESI RegData); |
Executes TI-Basic 'QuadReg' command.
cmd_quadreg calculates a quadratic polynomial regression and updates all statistics variables (see TI-Basic manual for more info). The RegData parameter must point to a structure on the expression stack which describes where the actual data is stored. See cmd_linreg for more info.
See also: cmd_linreg, cmd_cubicreg, cmd_quartreg, cmd_powerreg, cmd_expreg, cmd_lnreg, cmd_sinreg, cmd_onevar, cmd_twovar, cmd_medmed, cmd_logistic
void cmd_quartreg (ESI RegData); |
Executes TI-Basic 'QuartReg' command.
cmd_quartreg calculates a quartic polynomial regression and updates all statistics variables (see TI-Basic manual for more info). The RegData parameter must point to a structure on the expression stack which describes where the actual data is stored. See cmd_linreg for more info.
See also: cmd_linreg, cmd_quadreg, cmd_cubicreg, cmd_powerreg, cmd_expreg, cmd_lnreg, cmd_sinreg, cmd_onevar, cmd_twovar, cmd_medmed, cmd_logistic
void cmd_randseed (CESI seed); |
Executes TI-Basic 'RandSeed' command.
cmd_randseed sets the seeds for the TI-Basic random number generator.
seed should point to an integer item. If it is zero, then the
seeds are set to the factory defaults for the random number generator, else
the value is used to calculate two seeds, which are stored in the TI-Basic
system variables "seed1" and "seed2".
Note: This function controls only the TI-Basic random number
generator, so it has nothing to do with the random number generator from
stdlib.h (i.e. with
srand). You can use the function
push_rand to call the TI-Basic random number
generator, but note that it is much slower than the random number generator
implemented in stdlib.h.
See also: push_rand
void cmd_rclgdb (SYM_STR SymName); |
Executes TI-Basic 'RclGDB' command.
cmd_rclgdb restores all settings to the settings stored in the Graph database variable whose name is pointed to by SymName (a VAT string, see SYMSTR). See cmd_stogdb for more info.
See also: cmd_stogdb
void cmd_rclpic (SYM_STR SymName, CESI y, CESI x); |
Executes TI-Basic 'RclPic' command.
cmd_rclpic displays the Graph Screen and logically ORs the picture stored in
the TI-Basic variable pointed to by SymName (a VAT variable string,
see SYMSTR) into the current graph screen
at the pixel coordinates determined by the values pointed to by y and
x, respectively. Both x and y should point to integer
items. SymName should be the name of a PIC variable.
See BitmapPut for much faster
low-level manipulations with bitmap pictures, independently of the Graph
Screen.
See also: cmd_andpic, cmd_xorpic, cmd_rplcpic, cmd_stopic, BitmapPut
void cmd_rename (SYM_STR OldName, SYM_STR NewName); |
Executes TI-Basic 'Rename' command.
cmd_rename renames a TI-Basic variable. The parameters OldName and
NewName should point to the variable tags of the old name and the new
name, respectively (see SYMSTR). This
function may be used as a high-level alternative to the low-level function
SymMove from the
vat.h header file.
This function may cause heap compression.
See also: cmd_copyvar, cmd_movevar, SymMove
void cmd_request (CESI PromptStr, SYM_STR SymName); |
Executes TI-Basic 'Request' command.
cmd_request displays a dialog box without a title which contains only a
request box (i.e. an input line box) and two buttons ("OK" and "Cancel").
The parameter PromptStr should point to the tag of a string item
which describes a prompt of at most 20 characters which will appear in front
of the request box, and SymName should point to the variable tag of
the name of a TI-Basic variable (see
SYMSTR). If this variable exists and
contains a string value, this value will be displayed and highlighted in the
input box as the default choice, else the input box will be empty. Either
way, if the user presses 'ENTER', the value from the input box will be stored
in this variable as a string value (it will be created if it does not exist,
except if the user presses the 'ESC' key).
Note: See the dialogs.h header file
for much more flexible methods to create dialog boxes.
See also: cmd_text, cmd_dialog, dialogs.h
void cmd_return (CESI retval); |
Executes TI-Basic 'Return' command.
cmd_return is an internal subroutine used by the TI-Basic interpreter for
executing the Return statement (searches for a matching EndFunc or EndPrgm
instruction, transfers the control there and eventually returns the
expression pointed to by retval).
As this function depends heavily on some system state variables of the
TI-Basic intepreter which are not set correctly while executing an ASM
program, it is extremely unlikely that this function may be used inside a C
program for anything useful.
Note: See section How to make a
program returning a value to learn about returning values to TI-Basic
from a C program.
See also: cmd_exit, cmd_passerr
void cmd_rplcpic (SYM_STR SymName, CESI y, CESI x); |
Executes TI-Basic 'RplcPic' command.
cmd_rplcpic displays the Graph Screen and draws the picture stored in the
TI-Basic variable pointed to by SymName (a VAT variable string, see
SYMSTR) into the current graph screen at
the pixel coordinates determined by the values pointed to by y and
x, respectively.
Both x and y should point to integer items.
SymName should be the name of a PIC variable.
See BitmapPut for much faster
low-level manipulations with bitmap pictures, independently of the Graph
Screen.
See also: cmd_rclpic, cmd_andpic, cmd_xorpic, cmd_stopic, BitmapPut
void cmd_send (CESI List); |
Executes TI-Basic 'Send' command.
cmd_send expects that List points to LIST_TAG. It sends the list pointed to by List to the link port to be accepted by a CBL (Calculator-Based Laboratory) device.
See also: cmd_get, cmd_sendcalc, cmd_sendchat
void cmd_sendcalc (SYM_STR SymName); |
Executes TI-Basic 'SendCalc' command.
cmd_sendcalc sends a variable (or program) pointed to by SymName (a VAT string, see SYMSTR) to the link interface, where another unit linked to the link port can receive the variable value. This function calls sendcalc from the link.h header file. If you send a variable from a TI-89 or TI-92 Plus to a TI-92, an error occurs if the TI-92 executes the GetCalc command from TI-Basic. In this case, the sending unit must use cmd_sendchat instead.
See also: cmd_sendchat, cmd_getcalc, cmd_send, sendcalc
void cmd_sendchat (SYM_STR Var); |
Executes TI-Basic 'SendChat' command.
cmd_sendchat is a generic alternative to cmd_sendcalc, which is
useful if the receiving unit is a TI-92 (or for making a generic "chat" program that allows
any device to be used). See cmd_sendcalc for more info. This
function calls sendcalc
from the link.h header file.
cmd_sendchat sends a variable only if that variable is compatible with the TI-92, which is
typically true in "chat" programs. However, cmd_sendchat will not send an archived variable,
a TI-89 graph data base, etc.
See also: cmd_sendcalc, cmd_getcalc, cmd_send, sendcalc
void cmd_shade (ESI Args); |
Executes TI-Basic 'Shade' command.
cmd_shade displays the Graph Screen, graphs two expressions on the screen as
functions using "x" as the independent variable, and shades the areas in
which the first expression is less than the second one (see TI-Basic manual
for more info). This function expects one of the following layouts on the
expression stack:
END_TAG expression_2 expression_1 |
END_TAG x_low expression_2 expression_1 |
END_TAG x_high x_low expression_2 expression_1 |
END_TAG pattern x_high x_low expression_2 expression_1 |
END_TAG pat_res pattern x_high x_low expression_2 expression_1 |
1 | Vertical shading [DEFAULT] |
2 | Horizontal shading |
3 | Negative-slope (45 degree) shading |
4 | Positive-slope (45 degree) shading |
1 | Solid shading |
2 | 1 pixel spacing [DEFAULT] |
3 | 2 pixel spacing |
4 | 3 pixel spacing |
5 | 4 pixel spacing |
6 | 5 pixel spacing |
7 | 6 pixel spacing |
8 | 7 pixel spacing |
9 | 8 pixel spacing |
10 | 9 pixel spacing |
See also: cmd_drawfunc, cmd_drawparm, cmd_drawpol
void cmd_showstat (void); |
Executes TI-Basic 'ShowStat' command.
cmd_showstat displays a dialog box containing the last computed statistics results if they are still valid (they are cleared automatically if the data to compute them has changed). This function may be used after a statistics or regression calculation using cmd_onevar, cmd_linreg, or something similar.
See also: cmd_onevar, cmd_twovar, cmd_linreg, cmd_quadreg, cmd_cubicreg, cmd_quartreg, cmd_powerreg, cmd_expreg, cmd_lnreg, cmd_sinreg, cmd_medmed, cmd_logistic
void cmd_sinreg (ESI RegData); |
Executes TI-Basic 'SinReg' command.
cmd_sinreg calculates a sine regression and updates all the statistics
variables (see TI-Basic manual for more info). The RegData parameter
must point to a structure on the expression stack which describes where the
actual data is stored. This structure may have one of the following eight
layouts (RegData should point to the last item):
NOTHING_TAG NOTHING_TAG NOTHING_TAG NOTHING_TAG y_list_name x_list_name |
NOTHING_TAG NOTHING_TAG NOTHING_TAG iterations y_list_name x_list_name |
NOTHING_TAG NOTHING_TAG period NOTHING_TAG y_list_name x_list_name |
NOTHING_TAG NOTHING_TAG period iterations y_list_name x_list_name |
END_TAG categories_list LIST_TAG categories_name NOTHING_TAG NOTHING_TAG y_list_name x_list_name |
END_TAG categories_list LIST_TAG categories_name NOTHING_TAG iterations y_list_name x_list_name |
END_TAG categories_list LIST_TAG categories_name period NOTHING_TAG y_list_name x_list_name |
END_TAG categories_list LIST_TAG categories_name period iterations y_list_name x_list_name |
See also: cmd_linreg, cmd_quadreg, cmd_cubicreg, cmd_quartreg, cmd_powerreg, cmd_expreg, cmd_lnreg, cmd_onevar, cmd_twovar, cmd_medmed, cmd_logistic
void cmd_slpline (CESI y0, CESI x0, CESI slope); |
Executes TI-Basic 'SlpLine' command.
cmd_slpline displays the Graph Screen and draws a line on it as a graph of
the equation y-y0=slope*(x-x0)
, where
x and y are the independent and dependent variables, respectively. The
parameters x0, y0, and slope should point to integer
or floating point items on the expression stack. See the TI-Basic manual for more
info.
See also: cmd_linetan, cmd_line
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.
See also: cmd_sortd
void cmd_sortd (ESI SymName); |
Executes TI-Basic 'SortD' command.
cmd_sortd sorts elements in a TI-Basic list variable in descending 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_sortd. Instead, if you want to sort the list variable named "foo", for example, you should do:
push_expression (SYMSTR ("foo")); cmd_sortd (top_estack);
This function may cause heap compression and expansion of the expression stack.
See also: cmd_sorta
void cmd_stogdb (SYM_STR SymName); |
Executes TI-Basic 'StoGDB' command.
cmd_stogdb creates a Graph database (GDB) variable whose name is pointed to by SymName (a VAT string, see SYMSTR), containing the current graphing mode, 'Y=' functions, Window variables, Graph format settings, 1 or 2 Graph setting (split screen and ratio settings if 2-Graph mode), Angle mode, Real/complex mode, Initial conditions for Sequence and Diff Equations mode, Table flags, tblStart, Delta_tbl and tblInput system variables. These items are saved for both graphs in 2-Graph mode. You can use cmd_rclgdb to restore the graph environment later.
See also: cmd_rclgdb
void cmd_stopic (ESI Args); |
Executes TI-Basic 'StoPic' command.
cmd_stopic displays the Graph Screen and stores a part of it in a TI-Basic
PIC variable.
This function expects one of the following layouts on the expression stack:
END_TAG symname |
END_TAG y symname |
END_TAG x y symname |
END_TAG width x y symname |
END_TAG height width x y symname |
See also: cmd_rclpic, cmd_rplcpic, cmd_andpic, cmd_xorpic, BitmapGet
void cmd_style (CESI EqnNum, CESI StyleString); |
Executes TI-Basic 'Style' command.
cmd_style sets the system graphing function determined by EqnNum in the current
graph mode to use the graphing property determined by StyleString. EqnNum
must point to an integer item in the range from 1 to 99, and the
corresponding graph function must already exist. StyleString must point to a string
item containing one of the following strings: "LINE", "DOT", "THICK", "ANIMATE",
"PATH", "ABOVE", "BELOW", "SQUARE". Note that some settings are not valid in various graph
modes. The following table shows valid style names for particular graph modes:
Graph mode | Valid styles |
Function | LINE, DOT, THICK, ANIMATE, PATH, ABOVE, BELOW, SQUARE |
Parametric/Polar | LINE, DOT, THICK, ANIMATE, PATH, SQUARE |
Sequence | LINE, DOT, THICK, SQUARE |
3D | none |
Diff Equations | LINE, DOT, THICK, ANIMATE, PATH, SQUARE |
void cmd_table (ESI ExprEtc); |
Executes TI-Basic 'Table' command.
cmd_table builds a table for the specified expression/function and displays
it on the screen by activating the Table application. This function expects
the following layout on the expression stack before calling, depending on the
current graph mode (ExprEtc should point to the last item):
Graph mode | Requested layout on the expression stack |
Function graphing | END_TAG var_name expression |
Parametric graphing | END_TAG var_name y_expression x_expression |
Polar graphing | END_TAG var_name expression |
sin(t)+sin(2t)
with respect to t (assuming
that the current graph mode is "Function" or "Polar"), you should do:
push_quantum (VAR_T_TAG); push_parse_text ("sin(t)+sin(2t)"); cmd_table (top_estack);
Or, you can avoid push_parse_text by transforming the expression into RPN manually (which is very easy):
static ESQ rpn[] = {END_TAG, VAR_T_TAG, VAR_T_TAG, SIN_TAG, VAR_T_TAG, 2, 1, POSINT_TAG, MUL_TAG, SIN_TAG, ADD_TAG}; cmd_table (rpn + sizeof(rpn) - 1);
All expressions entered using cmd_table and
cmd_graph are remembered and assigned
increasing function numbers starting with 1. The currently selected 'Y='
functions are ignored. Use cmd_clrgraph to
clear these functions (they will also be cleared after you go to the Y=
Editor application to re-enable the system 'Y=' functions).
See the TI-Basic manual for more info.
You can use cmd_blddata as an alternative
to this function.
See also: cmd_blddata, cmd_graph, cmd_clrgraph
void cmd_text (CESI string); |
Executes TI-Basic 'Text' command.
cmd_text displays the dialog box without a title which contains only s static text message and the 'OK' button. The parameter string should point to the tag of a string item which describes the text to be displayed.
See also: cmd_request, cmd_dialog, dialogs.h, DlgMessage
void cmd_toolbar (void); |
Executes TI-Basic 'Toolbar' command.
cmd_toolbar is an internal subroutine used by the TI-Basic interpreter for
defining toolbar menus using 'ToolBar'...'EndTBar' blocks.
As this function depends heavily on some system state variables of the
TI-Basic intepreter which are not set correctly while executing an ASM
program, it is extremely unlikely that this function may be used inside a C
program for anything useful.
Note: See functions from menus.h if you
want to make toolbar menus inside a C program.
See also: cmd_custom, cmd_custmon, cmd_popup, menus.h
void cmd_trace (void); |
Executes TI-Basic 'Trace' command.
cmd_trace displays the Graph Screen, draws a Smart Graph on it (see TI-Basic
manual for more info about the Smart Graph feature), places the trace cursor
on the first defined 'Y=' function at the previously defined cursor position
(or at the default position if regraphing was necessary), then allows tracing
the graph using the cursor keys.
Note: Press 'ENTER' to resume execution after this function.
void cmd_try (void); |
Executes TI-Basic 'Try' command.
cmd_try is an internal subroutine used by the TI-Basic interpreter for
initializing an error-protected block ('Try'...'EndTry').
As this function depends heavily on some system state variables of the
TI-Basic intepreter which are not set correctly while executing an ASM
program, it is extremely unlikely that this function may be used inside a C
program for anything useful.
Note: See TRY,
ONERR, and
ENDTRY to learn how to take control over
errors while executing a C program.
See also: cmd_endtry, cmd_clrerr, cmd_passerr, error.h
void cmd_twovar (ESI StatData); |
Executes TI-Basic 'TwoVar' command.
cmd_twovar calculates two-variable statistics and updates all statistics
variables (see TI-Basic manual for more info). The StatData parameter
must point to a structure on the expression stack which describes where the
actual data is stored. This structure may have one of the following four
layouts (StatData should point to the last item):
NOTHING_TAG NOTHING_TAG NOTHING_TAG y_list_name x_list_name |
NOTHING_TAG NOTHING_TAG freqs_name y_list_name x_list_name |
END_TAG categories_list LIST_TAG categories_name NOTHING_TAG y_list_name x_list_name |
END_TAG categories_list LIST_TAG categories_name freqs_name y_list_name x_list_name |
push_quantum (NOTHING_TAG); push_quantum (NOTHING_TAG); push_quantum (NOTHING_TAG); push_expression (SYMSTR ("ydata")); push_expression (SYMSTR ("xdata")); cmd_twovar (top_estack);
After this, you can retrieve the calculated regression data by accessing
TI-Basic system variables like "minX" directly (using
VarRecall, for example), or you can
display the calculated data using
cmd_showstat.
The symbol names x_list_name, y_list_name, freqs_name,
and categories_name may also be "c1".."c99". In this case, they
represent columns in the last data variable shown in the Data/Matrix editor.
In all cases, the lists represented by x_list_name,
y_list_name, freqs_name, and categories_name must have
the same dimension.
See also: cmd_onevar, cmd_linreg, cmd_quadreg, cmd_cubicreg, cmd_quartreg, cmd_powerreg, cmd_expreg, cmd_lnreg, cmd_sinreg, cmd_medmed, cmd_logistic
void cmd_unarchiv (CESI VarNameList); |
Executes TI-Basic 'UnArchiv' command.
cmd_unarchiv unarchives one or more TI-Basic variables (i.e. VAT symbols). For details about VarNameList, see cmd_lock.
See also: cmd_archive, cmd_unlock, cmd_lock
void cmd_unlock (CESI VarNameList); |
Executes TI-Basic 'Unlock' command.
cmd_unlock unlocks one or more TI-Basic variables (i.e. VAT symbols). For details about VarNameList, see cmd_lock.
See also: cmd_lock, cmd_unarchiv, cmd_archive
void cmd_while (CESI condition); |
Executes TI-Basic 'While' command.
cmd_while is an internal subroutine used by the TI-Basic interpreter for
executing 'While'...'EndWhile' loops (searches for a matching 'EndWhile' instruction
and transfers the control there if the condition is not true).
As this function depends heavily on some system state variables of the
TI-Basic intepreter which are not set correctly while executing an ASM
program, it is extremely unlikely that this function may be used inside a C
program for anything useful.
Note: See the
while
keyword to learn
how to use loops in the C language which are similar to While...EndWhile loops
in TI-Basic.
See also: cmd_endwhile, cmd_endloop
void cmd_xorpic (SYM_STR SymName, CESI y, CESI x); |
Executes TI-Basic 'XorPic' command.
cmd_xorpic displays the Graph Screen and logically XORs the picture stored in
the TI-Basic variable pointed to by SymName (a VAT variable string,
see SYMSTR) into the current graph screen
at the pixel coordinates determined by the values pointed to by y and
x, respectively. Both x and y should point to integer
items. SymName should be the name of a PIC variable.
See BitmapPut for much faster
low-level manipulations with bitmap pictures, independently of the Graph
Screen.
See also: cmd_rclpic, cmd_andpic, cmd_rplcpic, cmd_stopic, BitmapPut
void cmd_zoombox (void); |
Executes TI-Basic 'ZoomBox' command.
cmd_zoombox displays the Graph Screen, lets user draw a box that defines a new viewing window, and updates the viewing window. See the TI-Basic manual for more info.
See also: cmd_zoomstd
void cmd_zoomdata (void); |
Executes TI-Basic 'ZoomData' command.
cmd_zoomdata adjusts the viewing window settings based on the currently defined statistical plots (and data) so that all statistical data points will be sampled, and displays the Graph Screen. The adjustment is performed by updating the viewing window system variables ("xmin", etc.). This function does not adjust "ymin" and "ymax" for histograms. See the TI-Basic manual for more info.
See also: cmd_zoomstd
void cmd_zoomdec (void); |
Executes TI-Basic 'ZoomDec' command.
cmd_zoomdec adjusts the viewing window settings so that the increments for x and y are both 0.1, and displays the Graph Screen with the origin centered on the screen. The adjustment is performed by updating the viewing window system variables ("xmin", etc.). See the TI-Basic manual for more info.
See also: cmd_zoomstd
void cmd_zoomfit (void); |
Executes TI-Basic 'ZoomFit' command.
cmd_zoomfit displays the Graph Screen, adjusts the viewing window system variables for the dependent variables ("ymin", etc.) to view all the picture for the current independent variable settings, and updates the viewing window. See the TI-Basic manual for more info.
See also: cmd_zoomstd
void cmd_zoomin (void); |
Executes TI-Basic 'ZoomMin' command.
cmd_zoomin displays the Graph Screen, lets the user set a center point for a zoom in, and updates the viewing window. The magnitude of the zoom depends on the TI-Basic system variables "xFact" and "yFact", which determine the zoom factors. In 3D Graph mode, the magnitude depends on the system variables "xFact", "yFact", and "zFact". See the TI-Basic manual for more info.
See also: cmd_zoomout, cmd_zoomstd
void cmd_zoomint (void); |
Executes TI-Basic 'ZoomInt' command.
cmd_zoomint displays the Graph Screen, lets the user set a center point for the zoom, and adjusts the viewing window settings so that each pixel has an integer coordinate in all directions. The adjustment is performed by updating the viewing window system variables ("xmin", etc.). See the TI-Basic manual for more info.
See also: cmd_zoomstd
void cmd_zoomout (void); |
Executes TI-Basic 'ZoomOut' command.
cmd_zoomout displays the Graph Screen, lets the user set a center point for a zoom out, and updates the viewing window. The magnitude of the zoom depends on the TI-Basic system variables "xFact" and "yFact", which determine the zoom factors. In 3D Graph mode, the magnitude depends on the system variables "xFact", "yFact" and "zFact". See the TI-Basic manual for more info.
See also: cmd_zoomin, cmd_zoomstd
void cmd_zoomprev (void); |
Executes TI-Basic 'ZoomPrev' command.
cmd_zoomprev displays the Graph Screen and updates the viewing window with the settings in use before the last zoom. See the TI-Basic manual for more info.
See also: cmd_zoomstd
void cmd_zoomrcl (void); |
Executes TI-Basic 'ZoomRcl' command.
cmd_zoomrcl displays the Graph Screen and updates the viewing window using the settings stored with the cmd_zoomsto function. See the TI-Basic manual for more info.
See also: cmd_zoomsto, cmd_zoomstd
void cmd_zoomsqr (void); |
Executes TI-Basic 'ZoomSqr' command.
cmd_zoomsqr displays the Graph screen, adjusts the x or y viewing window settings so that each pixel represents an equal width and height in the coordinate system, and updates the viewing window. See the TI-Basic manual for more info.
See also: cmd_zoomstd
void cmd_zoomstd (void); |
Executes TI-Basic 'ZoomStd' command.
cmd_zoomstd sets the viewing window system variables ("xmin", etc.) to the
following default values (depending on the graphing mode), and then updates
the viewing window:
Function | xmin=-10 xmax=10 xscl=1 ymin=-10 ymax=10 yscl=1 xres=2 |
Parametric | tmin=0 tmax=2*pi tstep=pi/24 xmin=-10 xmax=10 xscl=1 ymin=-10 ymax=10 yscl=1 |
Polar | qmin=0 qmax=2*pi qstep=pi/24 xmin=-10 xmax=10 xscl=1 ymin=-10 ymax=10 yscl=1 |
Sequence | nmin=1 nmax=10 plotStrt=1 plotStep=1 xmin=-10 xmax=10 xscl=1 ymin=-10 ymax=10 yscl=1 |
3D | eyeq=20 eyeF=70 eyey=0 xmin=-10 xmax=10 xscl=14 ymin=-10 ymax=10 yscl=14 zmin=-10 zmax=10 ncontour=5 |
Differential Equations | t0=0 tmax=10 tstep=0.1 tplot=0 xmin=-1 xmax=10 xscl=1 ymin=-10 ymax=10 yscl=1 ncurves=0 Estep=1 diftol=0.001 fldres=14 dtime=0 |
See also: cmd_zoombox, cmd_zoomdata, cmd_zoomdec, cmd_zoomfit, cmd_zoomint, cmd_zoomout, cmd_zoomprev, cmd_zoomrcl, cmd_zoomsqr, cmd_zoomsto, cmd_zoomtrig, cmd_zoomin
void cmd_zoomsto (void); |
Executes TI-Basic 'ZoomSto' command.
cmd_zoomsto stores the current viewing window system variables ("xmin", etc.) in a specially reserved block of memory ("Zoom" memory). You can use cmd_zoomrcl to restore the settings. See the TI-Basic manual for more info.
See also: cmd_zoomrcl, cmd_zoomstd
void cmd_zoomtrig (void); |
Executes TI-Basic 'ZoomTrig' command.
cmd_zoomtrig displays the Graph Screen, sets the TI-Basic viewing window system variables "Delta_x" to pi/24 and "xscl" to pi/2, centers the origin, sets the y settings for "ymin", "ymax" and "yscl" to -4, 4, and 5, respectively, and updates the viewing window. See the TI-Basic manual for more info.
See also: cmd_zoomstd