EasyManuals Logo
Home>Texas Instruments>Calculator>TI-89

Texas Instruments TI-89 Tip List

Texas Instruments TI-89
507 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #331 background imageLoading...
Page #331 background image
Local ät
getType(#än)ät
Return ät
EndFunc
A similar method embeds underscore characters "_" in the variable names. For example, you could
use n_ for n, t_ for t, and so on. Again, you assume that the user does not use these names.
As another work-around, expr() can be used to build expressions to evaluate, for example
v#n becomes expr("v"&n)
#nv becomes expr(n&"v")
getType(#n)n becomes expr("getType"&n&")t")
With this method, this version of testtype() returns the correct results:
testtype(n)
Func
Local t
expr("getType("&n&")t")
Return t
EndFunc
(Credit to Martin Daveluy)
[7.42] Find variable names used in expressions
It is often useful to extract the variable names from an expression or equation. For example, the
variables can be deleted, archived, initialized and so on. Timité Hassan and Bhuvanesh Bhatt, have
both written functions to extract variable names. This tip discusses both methods.
Timité's TI Basic version
Timité's function getvars() returns the variable names of an expression passed as a string. I have
slightly modified his function, and changed the name to exprvars() to avoid confusion. My modifications
change the external subroutines to local routines, and convert some nested-If expressions to when()
functions. The basic algorithm and code remains unchanged.
exprvars(g_str)
Func
©("expr") return list ofvariables in "expr"
©Timité Hassan, modified by dab
Local k,i,cc,g_vr,g_d,g_dim,g_ll,ss,varin,vardeb
Define varin(c)=Func
Local cc
ord(c)cc
when(c"a" and c"z",true,when(c"0" and c"9",true,when(cc≥128 and cc≤148 and
cc≠140,true,when(c="_",true,false))))
EndFunc
Define vardeb(c)=Func
Local cc
ord(c)cc
when(c"a" and c"z",true,when(cc≥128 and cc≤148 and cc≠140,true,false))
EndFunc
dim(g_str)g_dim
7 - 42

Table of Contents

Other manuals for Texas Instruments TI-89

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-89 and is the answer not in the manual?

Texas Instruments TI-89 Specifications

General IconGeneral
Display size (HxV)100 x 160 mm
Memory type639K FLASH ROM, 188K bytes RAM
Compatible operating systemsOperating System 2.09
Battery typeAAA

Related product manuals