I'm working with a TI Nspire, and for a function I'm writing, it would be extremely helpful if I could retrieve what is literally written in the cells of a spreadsheet, rather than the processed output.

For example, if I put 5+4 in cell a1, and I then refer to a1, I retrieve 9. However, it would be far more helpful to me if I could actually retrieve "5+4" (getting it as a string or an expression would be fine, either way).

Does anyone know of a way to do this?

Thanks! Smile
caltrop wrote:
I'm working with a TI Nspire, and for a function I'm writing, it would be extremely helpful if I could retrieve what is literally written in the cells of a spreadsheet, rather than the processed output.

For example, if I put 5+4 in cell a1, and I then refer to a1, I retrieve 9. However, it would be far more helpful to me if I could actually retrieve "5+4" (getting it as a string or an expression would be fine, either way).

Does anyone know of a way to do this?

Thanks! Smile


Hi Calctrop,

If you are using the cell sheet app on the Nspire, you can simply put quotation marks around the text that you have inputted for it to be recognized as a string rather than an equation.
rohanmodi wrote:

If you are using the cell sheet app on the Nspire, you can simply put quotation marks around the text that you have inputted for it to be recognized as a string rather than an equation.


That is entirely true, and it's the best workaround I've encountered so far. I just normally want to both evaluate the expression and parse it for other purposes. It seems mildly inconvenient to have to quote every expression I enter. However, if there's no other way to make it parseable, I guess that's my best bet.

Thanks! Smile
What type of data are you inputtng that requires math expressions expressed as strings rather than the actual solution to the problem?
rohanmodi wrote:
What type of data are you inputtng that requires math expressions expressed as strings rather than the actual solution to the problem?


A valid question! Razz I'm an engineering student and I do a lot of calculations in the spreadsheet app because I can make alterations to formulas or revisions to data and the effects will cascade down. (If I were using calculator, I'd have to re-enter a bunch of expressions if I wanted to revise something I did earlier.) However, there are some things that it would be nice to have clearly laid out in other columns.

For example, if I assign the value in a cell to a variable, the variable assignment isn't readily visible (it just shows me the result of the expression until I select the cell). If I could parse out the variable and have it display in an adjacent column, that would be very handy to me for quick reference. (Or, alternatively, if I could write the variable in another column and then have it parsed into an assignment, that would also work.) It's applications like this that have me wanting to be able to retrieve both the value of the expression, and the expression itself.
caltrop wrote:
[It's applications like this that have me wanting to be able to retrieve both the value of the expression, and the expression itself.


I mean if it that is very important you can simply write the equation twice, one in quotes, one not.
rohanmodi wrote:
I mean if it that is very important you can simply write the equation twice, one in quotes, one not.


It's not important enough to me that I'm willing to do it by hand. I was trying to figure out if there would be a way to automate the process (simply format the cells or write a function to parse it for me), then it would be a worth-while improvement in convenience, but as it stands, it doesn't sound like that's possible. I do appreciate the suggestions, though. Smile
  
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 GMT - 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