This wouldn't be a problem if it is only you who will be utilizing this, but if you share it, it could cause problems. Just something to consider.

]]>Thank you for finding my error and for the much simpler solution! ]]>

Furthermore, there is a *much* easier way to do this:

` ``Prompt A,B Input "Eqn:",Str1 A->X Disp expr(Str1 // This will attempt to evaluate Str1 as if it were typed in the home screen B->X Disp expr(Str1 // Again, but now X is equal to B instead (since we just changed it)`

But, nevertheless, you have some good practice with string manipulation!

]]>Here's the code at the beginning asking for A, B, and the equation. I want the equation to output to 2 strings because it needs to be substituted twice. I'm kind of a TI-Basic noob so if there's a better way to do this, please let me know.

` ``Prompt A Prompt B Input "Eqn:",Str1 Str1→Str0`

Str1 and Str0 are the same equation. Later on in the code I replace any instances of X with A:

` ``"X"→Str2 toString(A)→Str3 length(Str2→D 1→C While inString(Str1,Str2,C inString(Str1,Str2,C→C Str3 If C>1 sub(Str1,1,C-1)+Ans If C+D<1+length(Str1 Ans+sub(Str1,C+D,1+length(Str1)-(C+D Ans→Str1 C+length(Str3→C End`

And then with B. It's the same as the one above except I replaced Str1 with Str0 and A with B.

` ``"X"→Str2 toString(A)→Str3 length(Str2→D 1→C While inString(Str0,Str2,C inString(Str0,Str2,C→C Str3 If C>1 sub(Str0,1,C-1)+Ans If C+D<1+length(Str0 Ans+sub(Str0,C+D,1+length(Str0)-(C+D Ans→Str0 C+length(Str3→C End`

Then I displayed Str1 (the A string) and Str0 (B), but then it does this:

If A=2, B=3, and my equation is 3(x)-6, then Str1 should be 3(2)-6 and Str0 should be 3(3)-6, but it's saying that they're both 3(2)-6. Any help would be appreciated.