So I'll jump right into it, I'm in a middle of making a program that right now requires me to substitute a variable based on if B=1...8 so that means 8 different variables and 8 if statements, right? I hope not. The basic premise is that I think there is a way to substitute variables like a For command without it calling the number instead of the symbol of that number because I need to store the output for the f(x) into the variable.
Example Code:
Code:
Potential Solutions:
Code:
Here is a potential solution that doesn't work because variables as far as I know are considered one character in TI-Basic and so inferring a number into a variable prefix doesn't make the prefix plus the inferred number one variable.
This could be easily solved if the strings were all made the same length using .... or [Spaces] at the end, but I'm writing a program to measure pixel value based on the strings contents so adding things at the end could lead to issues and bugs if that said symbol is included in the compared string.
Example Code:
Code:
For(B,1,8)
If B=1:Str2->Str0
If B=2:Str3->Str0
If B=3:Str4->Str0
If B=4:Str5->Str0
If B=5:Str6->Str0
If B=6:Str7->Str0
If B=7:Str8->Str0
If B=8:Str9->Str0
End
Potential Solutions:
Code:
For(B,1,8)
sub(Str2+Str3+Str4+Str5+Str6+Str7+Str8+Str9,B,length(StrB))->Str0
End
Here is a potential solution that doesn't work because variables as far as I know are considered one character in TI-Basic and so inferring a number into a variable prefix doesn't make the prefix plus the inferred number one variable.
This could be easily solved if the strings were all made the same length using .... or [Spaces] at the end, but I'm writing a program to measure pixel value based on the strings contents so adding things at the end could lead to issues and bugs if that said symbol is included in the compared string.