Hi
I looking for some information about the part command on the TI 89 and nspire calculators.
For instance, an example of its use in a program snippet would help.
It seems to be some kind of expression parsing function.
Interestingly, the command not appear in the command catalog of the Nspire CAS (latest OS), yet the
calculator will run the command and output the same results as the TI 89 for the same expressions.
Thank you for any assistance you may be able to give me.
tgahan
I have never heard of this command, and it is not listed in the TI-BASIC Developer commands list.
As far as I can tell, this command does not exist (even though it obviously does Razz)
The part() function is essentially a parsing tool.

solve(x^2=4,x) returns x=2 or x=-2

part(solve(x^2=4,x)) returns 2, the number of arguments to the top-level function/operator in the expression.

To get each of these two arguments:
part(solve(x^2=4,x),1) returns x=2
part(solve(x^2=4,x),2) returns x=-2

To get the top-level function:
part(solve(x^2=4,x),0) returns β€œor”

This can be applied recursively to parse the rest of the expression, for example:

part(solve(x^2=4,x),1)→a [returns x=2 and stores the expression into a]
part(a) returns 2
part(a,1) returns x
part(a,2) returns 2
part(a,0) returns β€œ=”

You could use this to make a subprogram or function that searches for the values and puts them in a list, or something like that.
Hi MateoConLechuga
Thank you for your information, it gives me some insight to this command.
Difficult to obtain descriptions of its use.
Seems to be a useful function for storing multiple solutions to say a list variable.
I am sure it has lots of other uses in programming.
Regards
tgahan
Mateo's post is a pretty good start Smile
The TI-89's manual contains some information about the part( command. A quick search for my paper copy of that manual came up empty, but the PDF is available online, under e.g. the TI89TitaniumGuidebook_Part1_EN.pdf name (first results for "TI-89 manual" search engine query here), in which pages 216 to 218 provide a number of examples, or pages 851-852 in the much more complete (~1000-page !) TI89TitaniumGuidebook_Part2_EN.pdf .
These old manuals are invaluable.
calclover2514 wrote:
I have never heard of this command, and it is not listed in the TI-BASIC Developer commands list.
As far as I can tell, this command does not exist (even though it obviously does Razz)

Its literally on the list
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement