Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to turn a string into a variable? (TI-84)

Tags:

ti-basic

I'm trying to turn a string into a variable on my TI-84.

For example,

"XYZ"→Str0
fnInt(X²,sub(Str0,1,1),0,1)→A

But it's not letting me.

I know this seems like a really inefficient way of doing it (why not just do fnInt(X²,X,0,1)?), but in my program this would be very, very useful.

So is there a way to turn a string into a variable?

like image 954
user3932000 Avatar asked Jan 19 '26 11:01

user3932000


1 Answers

I don't think you can use a string where fnInt( expects a variable. The only thing I can recommend is to use a bunch of if statements, using I as the index of the variable you're using from your string. Basically, you'd have to write out these cases explicitly, since there's no way to make a string get interpreted as a variable for that function.

If I=1:fnInt(X²,X,0,1)→A
If I=2:fnInt(X²,Y,0,1)→A
If I=3:fnInt(X²,Z,0,1)→A
like image 50
kamoroso94 Avatar answered Jan 21 '26 08:01

kamoroso94