- Maniuplating strings and variables
- 11 Oct 2013 01:04:00 pm
- Last edited by BlackOnyx on 11 Oct 2013 01:25:01 pm; edited 3 times in total
Ok, I know this has been discussed a billion times over, but so far, there seems to be no good way to do this.
I want to be able to take a real number, either stored in a variable, or not, and put it into a string.
I also want to be able to do the reverse.
I can easily go from String to Number:
Code:
That part is simple enough. But the reverse, isnt.
Im getting stuck trying to figure out how to store X back to a string.
Code:
Here is my current code:
Code:
I want to be able to take a real number, either stored in a variable, or not, and put it into a string.
I also want to be able to do the reverse.
I can easily go from String to Number:
Code:
Input "Point x",Str1
String►Equ(Str1,Y₁)
Y₁→X
That part is simple enough. But the reverse, isnt.
Im getting stuck trying to figure out how to store X back to a string.
Code:
(Cant get X→Y₁)
Equ►String(Y₁,Str1)
Here is my current code:
Code:
ClrHome
Input "Point x:",Str1
Input "Point y:",Str2
Input "Slope:",Str3
ClrHome
Disp "Equation:"
String►Equ(Str1,Y₁)
String►Equ(Str2,Y₂)
String►Equ(Str3,Y₃)
Y₁→X
Y₂→Y
Y₃→M
(M▪⋅X)+Y→B
Disp "y="+Str3+"x +"
Output(2,9,B)
Pause