Re: TI85 Concatenating numbers/Numbers -> Strng
[Prev][Next][Index][Thread]
Re: TI85 Concatenating numbers/Numbers -> Strng
-
Subject: Re: TI85 Concatenating numbers/Numbers -> Strng
-
From: Robert Holmgren <chelsea.ios.com@chelsea.ios.com>
-
Date: Sun, 24 Nov 1996 04:28:08 GMT
-
In-Reply-To: <TI85 Concatenating numbers/Numbers -> Strng>
In <MmZH9a200YUz0ju0c0@andrew.cmu.edu>, Jonathan Todd Samuel
<jsamuel+@andrew.cmu.edu> writes:
>Real-to-String/String-to-Real Modules
>-------------------------------------
>By Jon Niehof and Jason Wenger
>------------------------------
The linear regression trick for number-to-$tring conversion needs to be
modified for the TI-83, but the principle is more or less the same (as on
the 85) -- in practice, it needs to be stated thusly:
-167.12=A ; e.g. a real number to convert...
{0,1}=L5:{A,A}=L6
LinReg(ax+b) L5,L6,Y0 ; resulting Y0 equation=0X+(-167.12)
Equ>String(Y0,Str0
sub(Str0,4,length(Str0)-3 ; strip leading "0X+" from Str0
Ans=Str0 ; Str0="-167.12"
You said that one should avoid all "->" operators in the routine, but it
seems labored not to abbreviate the last two lines as:
sub(Str0,4,length(Str0)-3)=Str0
The truth is, we're in $tringland from LinReg onward (derivation of the Y0
equation); it seems pretty clear to me that Y VARS are all stored
internally as strings.
Anyway, the kludge works -- amazing but true. Very clever. Only problem
is, in the middle of a long program the TI-83 interprets this code and then
insists on graphing the damn equation! A neat horizontal line, naturally.
Which isn't exactly what I had in mind. How the devil do I perform the
calc without triggering a graph?
References: