The <bascmd.h> Header File

Routines for executing TI-Basic commands

Functions

cmd_andpic
Executes TI-Basic 'AndPic' command.
cmd_archive
Executes TI-Basic 'Archive' command.
cmd_blddata
Executes TI-Basic 'BldData' command.
cmd_circle
Executes TI-Basic 'Circle' command.
cmd_clrdraw
Executes TI-Basic 'ClrDraw' command.
cmd_clrerr
Executes TI-Basic 'ClrErr' command.
cmd_clrgraph
Executes TI-Basic 'ClrGraph' command.
cmd_clrhome
Executes TI-Basic 'ClrHome' command.
cmd_clrio
Executes TI-Basic 'ClrIO' command.
cmd_clrtable
Executes TI-Basic 'ClrTable' command.
cmd_copyvar
Executes TI-Basic 'CopyVar' command.
cmd_cubicreg
Executes TI-Basic 'CubicReg' command.
cmd_custmoff
Executes TI-Basic 'CustmOff' command.
cmd_custmon
Executes TI-Basic 'CustmOn' command.
cmd_custom
Executes TI-Basic 'Custom' command.
cmd_cycle
Executes TI-Basic 'Cycle' command.
cmd_cyclepic
Executes TI-Basic 'CyclePic' command.
cmd_delfold
Executes TI-Basic 'DelFold' command.
cmd_delvar
Executes TI-Basic 'DelVar' command.
cmd_dialog
Executes TI-Basic 'Dialog' command.
cmd_disp
Executes TI-Basic 'Disp' command.
cmd_dispg
Executes TI-Basic 'DispG' command.
cmd_disphome
Executes TI-Basic 'DispHome' command.
cmd_disptbl
Executes TI-Basic 'DispTbl' command.
cmd_drawfunc
Executes TI-Basic 'DrawFunc' command.
cmd_drawinv
Executes TI-Basic 'DrawInv' command.
cmd_drawparm
Executes TI-Basic 'DrawParm' command.
cmd_drawpol
Executes TI-Basic 'DrawPol' command.
cmd_else
Executes TI-Basic 'Else' command.
cmd_endfor
Executes TI-Basic 'EndFor' command.
cmd_endloop
Executes TI-Basic 'EndLoop' command.
cmd_endtry
Executes TI-Basic 'EndTry' command.
cmd_endwhile
Executes TI-Basic 'EndWhile' command.
cmd_exit
Executes TI-Basic 'Exit' command.
cmd_expreg
Executes TI-Basic 'ExpReg' command.
cmd_fill
Executes TI-Basic 'Fill' command.
cmd_fnoff
Executes TI-Basic 'FnOff' command.
cmd_fnon
Executes TI-Basic 'FnOn' command.
cmd_for
Executes TI-Basic 'For' command.
cmd_get
Executes TI-Basic 'Get' command.
cmd_getcalc
Executes TI-Basic 'GetCalc' command.
cmd_goto
Executes TI-Basic 'Goto' command.
cmd_graph
Executes TI-Basic 'Graph' command.
cmd_if
Executes TI-Basic 'If' command.
cmd_ifthen
Executes TI-Basic 'If'...'Then' command.
cmd_input
Executes TI-Basic 'Input' command.
cmd_inputstr
Executes TI-Basic 'InputStr' command.
cmd_line
Executes TI-Basic 'Line' command.
cmd_linehorz
Executes TI-Basic 'LineHorz' command.
cmd_linetan
Executes TI-Basic 'LineTan' command.
cmd_linevert
Executes TI-Basic 'LineVert' command.
cmd_linreg
Executes TI-Basic 'LinReg' command.
cmd_lnreg
Executes TI-Basic 'LnReg' command.
cmd_local
Executes TI-Basic 'Local' command.
cmd_lock
Executes TI-Basic 'Lock' command.
cmd_logistic
Executes TI-Basic 'Logistic' command.
cmd_medmed
Executes TI-Basic 'MedMed' command.
cmd_movevar
Executes TI-Basic 'MoveVar' command.
cmd_newdata
Executes TI-Basic 'NewData' command.
cmd_newfold
Executes TI-Basic 'NewFold' command.
cmd_newpic
Executes TI-Basic 'NewPic' command.
cmd_newplot
Executes TI-Basic 'NewPlot' command.
cmd_newprob
Executes TI-Basic 'NewProb' command.
cmd_onevar
Executes TI-Basic 'OneVar' command.
cmd_output
Executes TI-Basic 'Output' command.
cmd_passerr
Executes TI-Basic 'PassErr' command.
cmd_pause
Executes TI-Basic 'Pause' command.
cmd_plotsoff
Executes TI-Basic 'PlotsOff' command.
cmd_plotson
Executes TI-Basic 'PlotsOn' command.
cmd_popup
Executes TI-Basic 'Popup' command.
cmd_powerreg
Executes TI-Basic 'PowerReg' command.
cmd_printobj
Executes TI-Basic 'PrintObj' command.
cmd_prompt
Executes TI-Basic 'Prompt' command.
cmd_ptchg
Executes TI-Basic 'PtChg' command.
cmd_ptoff
Executes TI-Basic 'PtOff' command.
cmd_pton
Executes TI-Basic 'PtOn' command.
cmd_pttext
Executes TI-Basic 'PtText' command.
cmd_pxlchg
Executes TI-Basic 'PxlChg' command.
cmd_pxlcircle
Executes TI-Basic 'PxlCircle' command.
cmd_pxlhorz
Executes TI-Basic 'PxlHorz' command.
cmd_pxlline
Executes TI-Basic 'PxlLine' command.
cmd_pxloff
Executes TI-Basic 'PxlOff' command.
cmd_pxlon
Executes TI-Basic 'PxlOn' command.
cmd_pxltext
Executes TI-Basic 'PxlText' command.
cmd_pxlvert
Executes TI-Basic 'PxlVert' command.
cmd_quadreg
Executes TI-Basic 'QuadReg' command.
cmd_quartreg
Executes TI-Basic 'QuartReg' command.
cmd_randseed
Executes TI-Basic 'RandSeed' command.
cmd_rclgdb
Executes TI-Basic 'RclGDB' command.
cmd_rclpic
Executes TI-Basic 'RclPic' command.
cmd_rename
Executes TI-Basic 'Rename' command.
cmd_request
Executes TI-Basic 'Request' command.
cmd_return
Executes TI-Basic 'Return' command.
cmd_rplcpic
Executes TI-Basic 'RplcPic' command.
cmd_send
Executes TI-Basic 'Send' command.
cmd_sendcalc
Executes TI-Basic 'SendCalc' command.
cmd_sendchat
Executes TI-Basic 'SendChat' command.
cmd_shade
Executes TI-Basic 'Shade' command.
cmd_showstat
Executes TI-Basic 'ShowStat' command.
cmd_sinreg
Executes TI-Basic 'SinReg' command.
cmd_slpline
Executes TI-Basic 'SlpLine' command.
cmd_sorta
Executes TI-Basic 'SortA' command.
cmd_sortd
Executes TI-Basic 'SortD' command.
cmd_stogdb
Executes TI-Basic 'StoGDB' command.
cmd_stopic
Executes TI-Basic 'StoPic' command.
cmd_style
Executes TI-Basic 'Style' command.
cmd_table
Executes TI-Basic 'Table' command.
cmd_text
Executes TI-Basic 'Text' command.
cmd_toolbar
Executes TI-Basic 'Toolbar' command.
cmd_trace
Executes TI-Basic 'Trace' command.
cmd_try
Executes TI-Basic 'Try' command.
cmd_twovar
Executes TI-Basic 'TwoVar' command.
cmd_unarchiv
Executes TI-Basic 'UnArchiv' command.
cmd_unlock
Executes TI-Basic 'Unlock' command.
cmd_while
Executes TI-Basic 'While' command.
cmd_xorpic
Executes TI-Basic 'XorPic' command.
cmd_zoombox
Executes TI-Basic 'ZoomBox' command.
cmd_zoomdata
Executes TI-Basic 'ZoomData' command.
cmd_zoomdec
Executes TI-Basic 'ZoomDec' command.
cmd_zoomfit
Executes TI-Basic 'ZoomFit' command.
cmd_zoomin
Executes TI-Basic 'ZoomMin' command.
cmd_zoomint
Executes TI-Basic 'ZoomInt' command.
cmd_zoomout
Executes TI-Basic 'ZoomOut' command.
cmd_zoomprev
Executes TI-Basic 'ZoomPrev' command.
cmd_zoomrcl
Executes TI-Basic 'ZoomRcl' command.
cmd_zoomsqr
Executes TI-Basic 'ZoomSqr' command.
cmd_zoomstd
Executes TI-Basic 'ZoomStd' command.
cmd_zoomsto
Executes TI-Basic 'ZoomSto' command.
cmd_zoomtrig
Executes TI-Basic 'ZoomTrig' command.

Predefined Types

CESI
Represents a pointer to a constant expression.
ESI
Represents an index of a value on the TIOS expression stack.
ESQ
Represents a quantum within an expression.
EStackIndex
Represents an index of a value on the TIOS expression stack.
Quantum
Represents a quantum within an expression.
SYM_STR
Represents a pointer to the terminating zero byte of a string.

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.

See also: basfunc.h, basop.h


cmd_andpic

AMS 1.01 or higher

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


cmd_archive

AMS 2.00 or higher

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


cmd_blddata

AMS 1.01 or higher

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.


cmd_circle

AMS 1.01 or higher

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:

1Draws the circle.
0Erases the circle.
-1Inverts pixels along the circle.

See also cmd_pxlcircle, which uses pixel coordinates instead of window-relative ones, and DrawClipEllipse for much faster low-level circle/ellipse drawing (independently of the Graph Screen).

See also: cmd_pxlcircle, DrawClipEllipse


cmd_clrdraw

AMS 1.01 or higher

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.


cmd_clrerr

AMS 1.01 or higher

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


cmd_clrgraph

AMS 1.01 or higher

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


cmd_clrhome

AMS 1.01 or higher

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


cmd_clrio

AMS 1.01 or higher

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.


cmd_clrtable

AMS 1.01 or higher

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.


cmd_copyvar

AMS 1.01 or higher

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


cmd_cubicreg

AMS 1.01 or higher

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


cmd_custmoff

AMS 1.01 or higher

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.


cmd_custmon

AMS 1.01 or higher

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


cmd_custom

AMS 1.01 or higher

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


cmd_cycle

AMS 1.01 or higher

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.


cmd_cyclepic

AMS 1.01 or higher

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.


cmd_delfold

AMS 1.01 or higher

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


cmd_delvar

AMS 1.01 or higher

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


cmd_dialog

AMS 1.01 or higher

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


cmd_disp

AMS 1.01 or higher

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.


cmd_dispg

AMS 1.01 or higher

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).


cmd_disphome

AMS 1.01 or higher

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!


cmd_disptbl

AMS 1.01 or higher

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.


cmd_drawfunc

AMS 1.01 or higher

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


cmd_drawinv

AMS 1.01 or higher

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


cmd_drawparm

AMS 1.01 or higher

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

The parameter ExprList should point to the tag of the last item. x_expr and y_expr are the expressions for "x(t)" and "y(t)", which define the curve. tmin, tmax and tstep are floating point items which determine the starting value, the ending value, and the increment of the independent variable "t" which will be used for drawing. For example, to draw the curve defined by 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


cmd_drawpol

AMS 1.01 or higher

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

The parameter ExprList should point to the tag of the last item. expr is the expression which defines the polar graph. thmin, thmax and thstep are floating point items which determine the starting value, the ending value, and the increment of the independent variable "theta" which will be used for drawing.

If the current graphing mode is not polar, only the first layout is valid. Otherwise, the omitted expressions will be picked from the current settings of the "thetamin", "thetamax" and "thetastep" system variables in the "Window Editor" application (note that "theta" means a Greek letter theta, not an actual string "theta").

See also: cmd_drawparm, cmd_drawfunc


cmd_else

AMS 1.01 or higher

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


cmd_endfor

AMS 1.01 or higher

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


cmd_endloop

AMS 1.01 or higher

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


cmd_endtry

AMS 1.01 or higher

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


cmd_endwhile

AMS 1.01 or higher

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


cmd_exit

AMS 1.01 or higher

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.


cmd_expreg

AMS 1.01 or higher

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


cmd_fill

AMS 1.01 or higher

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


cmd_fnoff

AMS 1.01 or higher

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


cmd_fnon

AMS 1.01 or higher

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


cmd_for

AMS 1.01 or higher

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


cmd_get

AMS 1.01 or higher

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


cmd_getcalc

AMS 1.01 or higher

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


cmd_goto

AMS 1.01 or higher

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.


cmd_graph

AMS 1.01 or higher

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 modeRequested layout on the expression stack
Function graphingEND_TAG var_name expression
Parametric graphingEND_TAG var_name y_expression x_expression
Polar graphingEND_TAG var_name expression
3D graphingEND_TAG y_var_name x_var_name expression

Graphing sequences and differential equations is not possible using this command. Variable names are optional, i.e. they may be omitted. In such cases, default variable names are used ("x" for function graphing, "t" for parametric graphing, "q" for polar graphing, and "x" and "y" for 3D graphing). For example, to graph the 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


cmd_if

AMS 1.01 or higher

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


cmd_ifthen

AMS 1.01 or higher

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.

See also: cmd_else, cmd_if


cmd_input

AMS 1.01 or higher

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).


cmd_inputstr

AMS 1.01 or higher

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.


cmd_line

AMS 1.01 or higher

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:

1Draws the line.
0Erases the line.
-1Inverts pixels along the line.

See also cmd_pxlline, which uses pixel coordinates instead of window-relative ones, and DrawLine (or DrawClipLine) for much faster low-level line drawing (independently of the Graph Screen).

See also: cmd_pxlline, DrawLine, DrawClipLine, cmd_circle, cmd_linehorz, cmd_linevert, cmd_pton, cmd_ptoff, cmd_ptchg


cmd_linehorz

AMS 1.01 or higher

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:

1Draws the line.
0Erases the line.
-1Inverts pixels along the line.

See also cmd_pxlhorz, which uses pixel coordinates instead of window-relative ones, and DrawLine (or DrawClipLine) for much faster low-level line drawing (independently of the Graph Screen).

See also: cmd_pxlhorz, DrawLine, DrawClipLine, cmd_linevert, cmd_line


cmd_linetan

AMS 1.01 or higher

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


cmd_linevert

AMS 1.01 or higher

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:

1Draws the line.
0Erases the line.
-1Inverts pixels along the line.

See also cmd_pxlvert, which uses pixel coordinates instead of window-relative ones, and DrawLine (or DrawClipLine) for much faster low-level line drawing (independently of the Graph Screen).

See also: cmd_pxlvert, DrawLine, DrawClipLine, cmd_linehorz, cmd_line


cmd_linreg

AMS 1.01 or higher

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

x_list_name is the VAT symbol name (see SYMSTR and Tags for more info) of a TI-Basic list variable which contains the x values. y_list_name is the VAT symbol name of a TI-Basic list variable which contains the y values. freqs_name (if present) is the VAT symbol name of a TI-Basic list variable which contains the frequencies (all frequencies are assumed to be 1 if freqs_name is not present). categories_name (if present) is the VAT symbol name of a TI-Basic list which contains the category code for each item. categories_list represents a list of integer items which determine which categories will be included (this makes sense only when categories_name is used).

For example, assuming that two TI-Basic list variables "xdata" and "ydata" contain the x and y values, you can calculate a simple regression using the following code fragment:

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


cmd_lnreg

AMS 1.01 or higher

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


cmd_local

AMS 1.01 or higher

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).


cmd_lock

AMS 1.01 or higher

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


cmd_logistic

AMS 1.01 or higher

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

x_list_name is the VAT symbol name (see SYMSTR and Tags for more info) of a TI-Basic list variable which contains the x values. y_list_name is the VAT symbol name of a TI-Basic list variable which contains the y values. iterations is an integer expression; if it is omitted, 64 is assumed. It specifies the maximum number of iterations in which a solution will be attempted (larger values result in better accuracy but longer execution times, and vice versa). freqs_name (if present) is the VAT symbol name of a TI-Basic list variable which contains the frequencies (all frequencies are assumed to be 1 if freqs_name is not present). categories_name (if present) is the VAT symbol name of a TI-Basic list which contains the category of each item. categories_list represents a list of integer items determining which categories will be included (this makes sense only when categories_name is used).

See cmd_linreg for more information.

See also: cmd_linreg, cmd_quadreg, cmd_cubicreg, cmd_quartreg, cmd_powerreg, cmd_expreg, cmd_lnreg, cmd_sinreg, cmd_onevar, cmd_twovar, cmd_medmed


cmd_medmed

AMS 1.01 or higher

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


cmd_movevar

AMS 1.01 or higher

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


cmd_newdata

AMS 1.01 or higher

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.


cmd_newfold

AMS 1.01 or higher

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


cmd_newpic

AMS 1.01 or higher

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.


cmd_newplot

AMS 1.01 or higher

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:

1Scatter plot
2X-Y line plot
3Box plot
4Histogram
5Modified box plot

The actual expected layout of the structure on the expression stack depends on the type of the statistical plot. For scatter and X-Y line plots, this structure may have one of the following four layouts:

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

plot_id is an integer item (which must belong to the range from 1 to 9) which represents the identification number of the plot (this number is used in cmd_plotson and cmd_plotsoff). x_list_name is the VAT symbol name (see SYMSTR and Tags for more info) of a TI-Basic list variable which contains the x values. y_list_name is the VAT symbol name of a TI-Basic list variable which contains the y values. categories_name (if present) is the VAT symbol name of a TI-Basic list variable which contains the category code for each item. categories_list represents a list of integer items which determine which categories will be included (this makes sense only if categories_name is used).

In scatter plots, the data points from the lists of x and y items are simply plotted as unconnected coordinate pairs. In X-Y line plots, the data points are plotted and connected in the order in which they appear in x and y lists. The plotted points are shown with the symbol determined by the mark_id item. It must be an integer item, containing one of the following values (a default value of 1 is used if it is omitted):

1box (a small empty square)
2cross (x)
3plus (+)
4square (a small filled square)
5dot

For box plots, the structure on the expressions stack may have one of the following four layouts:

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

data_list_name is the VAT symbol name of a TI-Basic list variable which contains the data values. freqs_name (if present) is the VAT symbol name of a TI-Basic list variable which contains the frequencies (all frequencies are assumed to be 1 if freqs_name is not present). Other items have the same meaning as for scatter and X-Y line plots.

Box plots plot the data with respect to the minimum and maximum data points (minX and maxX) in the set. A drawn box is defined by its first quartile (Q1), median (Med) and third quartile (Q3). Whiskers extend from minX to Q1 and from Q3 to maxX.

For modified box plots, the structure on the expressions stack may have one of the following eight layouts:

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

A modified box plot is very similar to an ordinary box plot, but it excludes all points outside the interval [Q1-X, Q3+X] where X is defined as 3*(Q3-Q1)/2. These points, called outliers, are plotted individually beyond the box plot's whiskers, using the mark determined by mark_id (default of 1 is used if omitted). The possible values of mark_id are the same as with scatter and X-Y line plots.

For histograms, the structure on the expressions stack may have one of the following eight layouts:

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

The meaning of all items (except bck_width) is the same as for box and modified box plots. bck_width is an integer item which determines the width of each bar. In histograms, the x axis is divided into equal widths called buckets or bars. The height of each bar indicates how many data points fall within the bar's range. See the TI-Basic manual for more info.

If everything written above seems too complicated for you, here is a simple example. Assuming that two TI-Basic list variables "xdata" and "ydata" contain the x and y values, and assuming that the Graph window variables are set accordingly, the following code fragment will create and display the X-Y line diagram of the given data using cross marks:

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


cmd_newprob

AMS 1.01 or higher

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.


cmd_onevar

AMS 1.01 or higher

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

list_name is the VAT symbol name (see SYMSTR and Tags for more info) of a TI-Basic list variable which contains the values. freqs_name (if present) is the VAT symbol name of a TI-Basic list variable which contains the frequencies (all frequencies are assumed to be 1 if freqs_name is not present). categories_name (if present) is the VAT symbol name of a TI-Basic list which contains the category code for each item. categories_list represents a list of integer items which determine which categories will be included (this makes sense only when categories_name is used).

For example, assuming that the TI-Basic list variable "dataval" contains statistical data, you can calculate simple one-variable statistics using the following code fragment:

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


cmd_output

AMS 1.01 or higher

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.


cmd_passerr

AMS 1.01 or higher

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


cmd_pause

AMS 1.01 or higher

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.


cmd_plotsoff

AMS 1.01 or higher

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


cmd_plotson

AMS 1.01 or higher

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


cmd_popup

AMS 1.01 or higher

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


cmd_powerreg

AMS 1.01 or higher

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


cmd_printobj

AMS 1.01 or higher

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.


cmd_prompt

AMS 1.01 or higher

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.


cmd_ptchg

AMS 1.01 or higher

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


cmd_ptoff

AMS 1.01 or higher

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


cmd_pton

AMS 1.01 or higher

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


cmd_pttext

AMS 1.01 or higher

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


cmd_pxlchg

AMS 1.01 or higher

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


cmd_pxlcircle

AMS 1.01 or higher

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:

1Draws the circle.
0Erases the circle.
-1Inverts pixels along the circle.

See also cmd_circle, which uses window-relative coordinates, and DrawClipEllipse for much faster low-level circle/ellipse drawing (independently of the Graph Screen).

See also: cmd_circle, DrawClipEllipse


cmd_pxlhorz

AMS 1.01 or higher

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:

1Draws the line.
0Erases the line.
-1Inverts pixels along the line.

See also cmd_linehorz, which uses window-relative coordinates, and DrawLine (or DrawClipLine) for much faster low-level line drawing (independently of the Graph Screen).

See also: cmd_linehorz, DrawLine, DrawClipLine, cmd_pxlvert, cmd_pxlline


cmd_pxlline

AMS 1.01 or higher

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:

1Draws the line.
0Erases the line.
-1Inverts pixels along the line.

See also cmd_line, which uses window-relative coordinates, and DrawLine (or DrawClipLine) for much faster low-level line drawing (independently of the Graph Screen). Graph Screen).

See also: cmd_line, DrawLine, DrawClipLine, cmd_pxlcircle, cmd_pxlhorz, cmd_pxlvert, cmd_pxlon, cmd_pxloff, cmd_pxlchg


cmd_pxloff

AMS 1.01 or higher

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


cmd_pxlon

AMS 1.01 or higher

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


cmd_pxltext

AMS 1.01 or higher

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


cmd_pxlvert

AMS 1.01 or higher

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:

1Draws the line.
0Erases the line.
-1Inverts pixels along the line.

See also cmd_linehorz, which uses window-relative coordinates, and DrawLine (or DrawClipLine) for much faster low-level line drawing (independently of the Graph Screen).

See also: cmd_linevert, DrawLine, DrawClipLine, cmd_pxlhorz, cmd_pxlline


cmd_quadreg

AMS 1.01 or higher

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


cmd_quartreg

AMS 1.01 or higher

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


cmd_randseed

AMS 1.01 or higher

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


cmd_rclgdb

AMS 1.01 or higher

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


cmd_rclpic

AMS 1.01 or higher

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


cmd_rename

AMS 1.01 or higher

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


cmd_request

AMS 1.01 or higher

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


cmd_return

AMS 1.01 or higher

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


cmd_rplcpic

AMS 1.01 or higher

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


cmd_send

AMS 1.01 or higher

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


cmd_sendcalc

AMS 1.01 or higher

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


cmd_sendchat

AMS 1.01 or higher

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


cmd_shade

AMS 1.01 or higher

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

Additionally, each of the entries x_low, x_high, pattern, and pat_res may be omitted and replaced with NOTHING_TAG. The parameter Args should point to the tag of the last item (i.e. expression_1).

x_low and x_high, if included, must be floating point or integer items. They specify the left and right boundaries for the shading process. Valid values are all real values between the values of TI-Basic system variables "xmin" and "xmax". Also, "xmin" and "xmax" are defaults for x_low and x_high if they are omitted.

pattern and pat_res, if included, must be integer items. pattern specifies one of the following four shading patterns:

1Vertical shading [DEFAULT]
2Horizontal shading
3Negative-slope (45 degree) shading
4Positive-slope (45 degree) shading

pat_res specifies the resolution of the shading patterns:

1Solid shading
21 pixel spacing [DEFAULT]
32 pixel spacing
43 pixel spacing
54 pixel spacing
65 pixel spacing
76 pixel spacing
87 pixel spacing
98 pixel spacing
109 pixel spacing

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_drawfunc, cmd_drawparm, cmd_drawpol


cmd_showstat

AMS 1.01 or higher

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


cmd_sinreg

AMS 1.01 or higher

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

x_list_name is the VAT symbol name (see SYMSTR and Tags for more info) of a TI-Basic list variable which contains the x values. y_list_name is the VAT symbol name of a TI-Basic list variable which contains the y values. iterations is an integer item in the range 1-16 (8 is assumed if it is ommited). It specifies the maximum number of iterations in which a solution will be attempted (larger values result in better accuracy but longer execution times, and vice versa). period is an integer or floating point item which specifies an estimated period. If omitted, the difference between values in the list which contains x values should be equal, and the values should be in sequential order, otherwise the differences between x values may vary. categories_name (if present) is the VAT symbol name of a TI-Basic list which contains the category for each item. categories_list represents a list of integer items determining which categories will be included (this makes sense only if categories_name is used).

See also: cmd_linreg, cmd_quadreg, cmd_cubicreg, cmd_quartreg, cmd_powerreg, cmd_expreg, cmd_lnreg, cmd_onevar, cmd_twovar, cmd_medmed, cmd_logistic


cmd_slpline

AMS 1.01 or higher

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


cmd_sorta

AMS 1.01 or higher

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


cmd_sortd

AMS 1.01 or higher

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


cmd_stogdb

AMS 1.01 or higher

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


cmd_stopic

AMS 1.01 or higher

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

Additionally, each of the entries x, y and width may be omitted and replaced with NOTHING_TAG. The parameter Args should point to the tag of the last item (i.e. symname). x, y, width and height should be integer items. x and y represent the upper left corner of the area to copy. Both default to 0 if they are omitted. width and height specify the dimensions in pixels. They default to the width and height of the whole graph screen. The symname entry is the VAT symbol name of a TI-Basic variable in which the graph data will be stored (it will be created if it does not exist).

See BitmapGet for a much faster low-level way of getting bitmapped data, independently of the Graph Screen.

See also: cmd_rclpic, cmd_rplcpic, cmd_andpic, cmd_xorpic, BitmapGet


cmd_style

AMS 1.01 or higher

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 modeValid styles
FunctionLINE, DOT, THICK, ANIMATE, PATH, ABOVE, BELOW, SQUARE
Parametric/PolarLINE, DOT, THICK, ANIMATE, PATH, SQUARE
SequenceLINE, DOT, THICK, SQUARE
3Dnone
Diff EquationsLINE, DOT, THICK, ANIMATE, PATH, SQUARE


cmd_table

AMS 1.01 or higher

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 modeRequested layout on the expression stack
Function graphingEND_TAG var_name expression
Parametric graphingEND_TAG var_name y_expression x_expression
Polar graphingEND_TAG var_name expression

Sequences, 3D functions and differential equations can not be tabulated using this function. Variable names are optional, i.e. they may be omitted. In such cases, default variable names for current graph mode are used ("x" for function graphing, "t" for parametric graphing, and "q" for polar graphing). For example, to graph the function 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


cmd_text

AMS 1.01 or higher

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


cmd_toolbar

AMS 1.01 or higher

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


cmd_trace

AMS 1.01 or higher

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.


cmd_try

AMS 1.01 or higher

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


cmd_twovar

AMS 1.01 or higher

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

x_list_name is the VAT symbol name (see SYMSTR and Tags for more info) of a TI-Basic list variable which contains the x values. y_list_name is the VAT symbol name of a TI-Basic list variable which contains the y values. freqs_name (if present) is the VAT symbol name of a TI-Basic list variable which contains the frequencies (all frequencies are assumed to be 1 if freqs_name is not present). categories_name (if present) is the VAT symbol name of a TI-Basic list which contains the category code for each item. categories_list represents a list of integer items which determine which categories will be included (this makes sense only when categories_name is used).

For example, assuming that two TI-Basic list variables "xdata" and "ydata" contain the x and y values, you can calculate simple two-variable statistics using the following code fragment:

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


cmd_unarchiv

AMS 2.00 or higher

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


cmd_unlock

AMS 1.01 or higher

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


cmd_while

AMS 1.01 or higher

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


cmd_xorpic

AMS 1.01 or higher

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


cmd_zoombox

AMS 1.01 or higher

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


cmd_zoomdata

AMS 1.01 or higher

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


cmd_zoomdec

AMS 1.01 or higher

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


cmd_zoomfit

AMS 1.01 or higher

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


cmd_zoomin

AMS 1.01 or higher

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


cmd_zoomint

AMS 1.01 or higher

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


cmd_zoomout

AMS 1.01 or higher

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


cmd_zoomprev

AMS 1.01 or higher

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


cmd_zoomrcl

AMS 1.01 or higher

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


cmd_zoomsqr

AMS 1.01 or higher

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


cmd_zoomstd

AMS 1.01 or higher

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 the TI-Basic manual for more info.

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


cmd_zoomsto

AMS 1.01 or higher

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


cmd_zoomtrig

AMS 1.01 or higher

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


Return to the main index